koajs / bodyparser

Koa body parsing middleware
MIT License
1.31k stars 116 forks source link

fail to parse form data #68

Closed smcmurray closed 7 years ago

smcmurray commented 7 years ago

Whenever I have my browser fetch('...', {method: 'POST', body: \<FormData>}), koa-bodyparser fails to parse it.

* \<FormData> is an instance of FormData

FebV commented 7 years ago

same issue when POST by postman in form-data

smcmurray commented 7 years ago

It seems that the only supported formType in koa-bodyparser is application/x-www-form-urlencoded FormData uses multipart/form-data

dead-horse commented 7 years ago

multipart is much more complex, it is hard to handle automatically, you can use co-busboy or co-multipart to process multipar body.