Open colinramsay opened 1 year ago
This is another case of #4443 with a different character, thank you for reporting it.
As far as I'm aware this is still an issue.
https://github.com/web3-storage/multipart-parser has meanwhile been archived :grimacing:
Yeah it's crazy to me that the whole upload segment of Remix is still marked as unstable and relies on this broken and (now) archived package.
You may want to consider just using formidable
. It looks popular and well-maintained.
There is really nothing Remix-specific about handling multipart form data. You can use any third-party library to process the standard Request object.
I appreciate that, but it doesn't negate the fact that the current docs reference unstable_parseMultipartFormData
which in turn uses multipart-parser. I'd be happy for Remix to just remove its own file upload stuff but the docs need to reflect that and probably make some recommendations.
What version of Remix are you using?
1.8
Steps to Reproduce
Send a multipart request with a quoted boundary in the content-type header:
Content-Type: multipart/form-data; boundary="2e798d44-9b0d-4284-a9d0-faaf252f82b3"
Expected Behavior
The uploaded file(s) should be detected.
Actual Behavior
Files are ignored, because
web3-storage/multipart-parser
expects a boundary without quotes. The following patch fixes the issue but unfortunately I can't see how to easily add a test for this.