There is a minor roadblock in using the multipart-parser library, which seems solvable with a simple fix.
Our Setup
A user profile can be updated via a form in Remix, including a profile picture.
We use two backends: one within Remix and another as a Spring application.
When a file is uploaded from Remix, it’s sent to an S3 bucket via the Spring application.
The Spring application generates a unique ID for the uploaded file and returns it once the upload is successful. (This ID is stored in the database to reference the file for future access.)
After receiving the file ID, we replace the file in the form data with its corresponding ID.
This approach allows us to seamlessly pass the form data along to the Spring application
The Issue
The requestHandler function's upload handler currently only accepts File, null or void as a return type.
There is a minor roadblock in using the
multipart-parser
library, which seems solvable with a simple fix.Our Setup
The Issue
The
requestHandler
function's upload handler currently only acceptsFile
,null
orvoid
as a return type.Proposed Fix
This update allows the handler to return a
File
,string
,null
,void
, or aPromise
resolving to any of these typesFormData
accepts.I’m happy to create a PR for this if that would be helpful.