Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Recommend koajs/koa-body instead of co-busboy for multipart #144

Closed
FossPrime opened this issue Oct 13, 2021 · 1 comment
Closed

[FR] Recommend koajs/koa-body instead of co-busboy for multipart #144

FossPrime opened this issue Oct 13, 2021 · 1 comment
Assignees

Comments

@FossPrime
Copy link

FossPrime commented Oct 13, 2021

co-busboy has poor ergonomics for koa use and requires a stack of app level dependencies to handle multipart forms. Meanwhile, the formidable based, streaming, first party koajs/koa-body exists...

https://github.com/koajs/koa-body
Sandbox: https://codesandbox.io/s/koa-body-upload-tt3c2
https://www.npmjs.com/package/formidable
https://stackoverflow.com/questions/55872109/how-to-upload-file-using-koa

How express deals with it:

https://expressjs.com/en/resources/middleware/body-parser.html
Screenshot from 2021-10-19 06-50-16

@3imed-jaberi
Copy link
Member

In the near future, we will update our documentation, where we will add more information about all aspects to build a backend.

In the current stage, I recommend to useone of these modules;

  • koa-bodyparser (didn't support form-data)
  • koa/multer (support only form-data)
  • koa-body

@3imed-jaberi 3imed-jaberi self-assigned this Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants