File arriving in larger than expected size in multipart/form-data
We have migrated a large express app to hono + @hono/zod-openapi and everything is great except our multipart/form-data file uploads.
The route looks like this:
The file is correctly available with all the details and content but they problem is that the content appears to be corrupt in some way since the size of the file uploaded is 1.2mb and the
Note that all the code for saving/retrieving file was working in the express app and is 100% the same. What could be the cause here?
Only difference is that in the express app we used
The route looks like this:
The file is correctly available with all the details and content but they problem is that the content appears to be corrupt in some way since the size of the file uploaded is 1.2mb and the
file.size in the route handler comes to around 2mb. When I save the file (an image) in S3 and retrieve it it's not consider an image.Note that all the code for saving/retrieving file was working in the express app and is 100% the same. What could be the cause here?
Only difference is that in the express app we used
multer to parse the request body where as in hono I'm not using anything.