koajs / koa-body

koa body parser middleware
MIT License
950 stars 130 forks source link

rewrite promisification of formidable form #193

Closed B0ER closed 3 years ago

B0ER commented 3 years ago

https://github.com/dlau/koa-body/issues/191

MarkHerhold commented 3 years ago

Sorry for the delay. Life is busy. At first glance, I like this. Let me review it further and refresh my memory of what tests there are to make sure all our bases are covered.

MarkHerhold commented 3 years ago

I do think we'll need to do a major version bump if we change the default. Is there a significant reason to change it?

Edit: I read #191 again and I think I get it. Will dig into it more

B0ER commented 3 years ago

No, there is no need to change it. Koa-body works correct. I've found an issue with the formidable library. It returns a file-object with the key "photos[]", while it has to return an array with this file-object (an array of one element). Also, formidable.opts.multiple = true.