h3 icon indicating copy to clipboard operation
h3 copied to clipboard

The readMultipartFormData function returns a buffer and does not function properly if the form contains a file.

Open Ray0907 opened this issue 11 months ago • 0 comments

Environment



Reproduction

As described subsequently

Describe the bug

According to the documentation at https://h3.unjs.io/utils/request#readmultipartformdataevent, the object should consist of key-value pairs from FormData. However, I received this response: { name: 'NAME', data: <Buffer > }. When I attempted to add file upload, it crashed. I previously used formidable to parse the file, but encountered issues with the callback not working. Therefore, I attempted to use readMultipartFormData to handle the FormData, but still encountered errors.

Additional context

No response

Logs

No response

Ray0907 avatar Mar 11 '24 04:03 Ray0907