Skip to content

fix(upload): resolve Web API FormData chunk error by using fetch()#14

Open
ThanhTrunggDEV wants to merge 1 commit intoaloth:mainfrom
ThanhTrunggDEV:fix-formData-upload
Open

fix(upload): resolve Web API FormData chunk error by using fetch()#14
ThanhTrunggDEV wants to merge 1 commit intoaloth:mainfrom
ThanhTrunggDEV:fix-formData-upload

Conversation

@ThanhTrunggDEV
Copy link
Copy Markdown

Resolves an issue where uploading files failed on newer Node versions (>=18) displaying \The chunk argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of FormData. This happens because \httpRequest\ passes the Web API \FormData\ object directly to Node's \http.request\ which does not support it natively. Switched to standard \ etch()\ mechanism for file uploads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant