Vivek
Vivek

Reputation: 225

File uploaded using postman shows undefined in request body

I am trying to create a multipart/form-data request in postman as below

enter image description here

However, while sending this request, I could see postman showing undefined for the fileToUpload

enter image description here

Any help on this issue is much appreciated.

Upvotes: 15

Views: 11017

Answers (1)

In my case it is showing undefined when I'm attaching a file to the multipart but the file is sent successfully.

I checked it because I used a mock endpoint to inspect the request payload being sent.

You can use any similar tool to check it:

Or any network sniffer.

Upvotes: 2

Related Questions