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
make Body.formData able to parse Multipart. #571
Comments
Thanks for sharing! With more and more modern browsers shipping with native support for However, if we could expose some of its functions so you can plug in this functionality as a separate library, we could consider that. Would that be an option? |
Ofc, I could make this as a separate module. It's more or less a plug in already Just need to come up with a way for detecting if it's natively supported or not and patch it accordingly. Just looking for Response.prototype.formData = Response.prototype.formData || toFormData
Request.prototype.formData = Request.prototype.formData || toFormData You are already implementing one already that handles url encoded I would like it if you throw an error or a warning that if they call |
Or how about lazy loading this from some CDN on demand? |
Hello, I would like having some more explanation about github.github. |
Closing this since multipart parsing is not something we want to address or keep maintaining. @jimmywarting Thanks for your suggestion! If you implement this as a plugin and need a way to hook into our polyfill, we can talk about that if you open a separate PR demonstrating how this could be done. BTW, our library has exports and a UMD build now (if that helps). |
I wrote this code recently that would make Body.formData able to parse Multipart bodies.
It's a bit more heavier. Just realize it conflicts with yours urlencoded version, so depending on the header this would kick in instead...
Code
Testing
I was wondering if you would like to implement this?
much credit to node-formidable for building one of the fastest popular body parser on npm
I just removed the Buffer part and replaced it with Uint8Array so it can work better in the browser
The text was updated successfully, but these errors were encountered: