m4nuC / async-busboy

Promise based multipart form parser for KoaJS
MIT License
167 stars 58 forks source link

TypeError: request.on is not a function #28

Closed SidFeng closed 7 years ago

SidFeng commented 7 years ago

const {files, fields} = await asyncBusboy(ctx.request); It's show 'TypeError: request.on is not a function'.

m4nuC commented 7 years ago

Sorry for the delay, did you get that issue solved? My guess is that you didn't pass the correct object to async-busboy

octet-stream commented 7 years ago

If it's still matter: You've just passed wrong object to async-busboy. ctx.request is not the same as ctx.req and it not a stream at all.

@m4nuC Could you add request checking on top of async-bysboy function? This argument just should be an instance of http.IncomingMessage.

m4nuC commented 7 years ago

@octet-stream Thanks for pointing this out.

I am adding the request checking,