dominhhai / koa-busboy

Upload files with Busboy
https://www.npmjs.com/package/koa-busboy
MIT License
31 stars 5 forks source link

Add support for google cloud functions #7

Closed christopherL91 closed 5 years ago

christopherL91 commented 5 years ago

This PR makes it possible to use this module together with google cloud functions. The issue here was that the request object was being tampered with before the request hit this module. I updated extract.js with the following content:

if (req.rawBody) {
  busboy.end(req.rawBody)
} else {
  req.pipe(busboy)
}

as per suggestion from here: busboy issue

dominhhai commented 5 years ago

thank you!