0

I want to send a file to an external api, but the post request must come from my backend. I have my client set up as so:

const formData = new FormData();
formData.append('fileToUpload', file);
fetch(API_URL, {method: 'POST', body: formData,})

I want to make this same request from my backend using this file with different headers. I've tried using a variety of form parsers such as busboy and formidable, but they don't seem to work.

KnlnKS
  • 43
  • 4
  • 2
    Does this answer your question? [Uploading file using POST request in Node.js](https://stackoverflow.com/questions/25344879/uploading-file-using-post-request-in-node-js) – Pawan Bishnoi Aug 08 '21 at 05:13
  • No it does not. The request library is deprecated. – KnlnKS Aug 08 '21 at 06:13

0 Answers0