-1

NodeJS

ReactJS

Hello, i'm novice in Nodejs. I have a problem and I would like to have a little help. I want create a dynamique Upload repository but i'm blocked, i cant recover my different params in my back from the front. I tried to send my various parameters in the body first: ex (data: formdata, username: usernam, currenturl: currenturl) ... but nothing works. I try to send the different data via the formdata with append('file',file) and append('currentUrl',currenturl) but i didnt know how recover this data from my back.

thank you very much in advance.

  • @hi adam welcome to SO. please add [minimum reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). avoid code prints, include your relevant code at the question instead. – buzatto Mar 13 '21 at 23:44

1 Answers1

-1

you should try to post your code in a code block (not image) so it is easier for us to help you.

I believe your question is that you can't get the additional field you want to include with the upload.

I see that you're appending some info to the formData to be sent from frontend to backend. These information will be available at req.body at your backend.

PKiong
  • 521
  • 4
  • 13