0

I'm trying to upload a file using postman.

I'm sending it via the formBody option on the server side.

If I look at the Postman Console, I get this: Image of Request Body

I have set the key to 'file' and the value (after selecting the type as 'file' from the drop down) to the file by browsing to it. it is in C:\temp\TestImage.png

It seems to me that this should be good to go. I left the content type as 'auto' which I assume would give it an octet stream or something...

In any event, I've verified that the URL to my server (localhost) is correct, but if the request is correct in the Postman Console then it is broken/not sending it correctly.

I intercepted another program sending the same file as an upload and it sent JSON as the body.. I'm assuming that the Console is just making that json pretty.

How come I'm getting file: undefined, instead of 'file: <file....>'

I'm getting a 404 on the back from the server, and all the other fields are matching, so I'm pretty sure the problem is that file is a required field and postman isn't sending it.

Here is my POST request: enter image description here

Traderhut Games
  • 1,222
  • 1
  • 15
  • 30

0 Answers0