You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passing Uint8Array or Buffer to postForm results in "source.on is not a function" exception.
Example Code
constdata=Uint8Array.from([1,2,3])axios.postForm('http://some.url',{ data })// orconstdata=Uint8Array.from([1,2,3])axios.postForm('http://some.url',{data: Buffer.from(data)})
Expected behavior, if applicable
axios should POST a field "data" with the content of the Uint8Array / Buffer
Environment
Axios Version 0.27.2
Node.js Version 18.2.0
OS: Windows 11
Additional context/Screenshots
Code is compiled from TypeScript using typescript 4.6.4 and a tsconfig.json that extends @tsconfig/node18/tsconfig.json
I am trying to upload the PDF output of puppeteer.
Describe the issue
Passing Uint8Array or Buffer to postForm results in "source.on is not a function" exception.
Example Code
Expected behavior, if applicable
axios should POST a field "data" with the content of the Uint8Array / Buffer
Environment
Additional context/Screenshots
Code is compiled from TypeScript using typescript 4.6.4 and a tsconfig.json that extends @tsconfig/node18/tsconfig.json
I am trying to upload the PDF output of puppeteer.
What am I doing wrong?