New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to send an array of pdf files using form-data #553
Comments
I would say that you don't need this pkg anymore. const formData = new FormData()
for (const file of files) {
const blob = await fs.openAsBlob(file.path)
formData.append('file[]', blob, `${file.type}_${file.month}.pdf`)
}
fetch(url, { method: 'POST', body: formData }) fetch, blob and formdata is built in globally now. |
@jimmywarting I am getting |
if you are going to use |
@jimmywarting Should have clarified that I am not using |
Built in
sry, can't help you there. |
I'm trying to send an array of pdf files to backend using form-data lib
I was trying to append pdf files like this:
and this is the axios request
but I'm getting this error, everytime I make an axios request
can anyone please tell me what's the issue here?
The text was updated successfully, but these errors were encountered: