I’m trying to call a post method with postman version 5.3.1 but I got the following error: “Required MultipartFile parameter ‘file’ is not present”. I tried disabling the “Content-Type” Headers. I attached the file in the body section, selecting the form-data option and putting “file” on key input field.
I’m looking this post jQuery Ajax file upload : Required MultipartFile parameter 'file' is not present too but I cannot get a solution.
I will try to answer, I might be wrong if I am misunderstanding the issue.
In postman you should adjust the header as multipart/from-data, do this in order to upload a file using an endpoint.
This will be done here:
I really hope this helps, if not let me know, with more detail about the issue
We are in a good path.
You are receiving a “The request was rejected because no multipart boundary was found”, and that is because your app need to split the “Multipart” being sent, and your application is complaining that it wasn’t able to separate the data because it wasn’t able to find its boundary, please read rfc1341 – 7.2.1 Multipart: The common syntax, where they explain about how boundairs work.
Now please try adding a boundary to the call. i.e.
Content-Type: multipart/form-data; boundary=gc0p4Jq0M2Yt08jU534c0p
You will find the explanation on the documentation, on my test bed it worked, I hope this works for you (if not can you please provide the code example of you server endpoint).
Answered By – Pablo Palacios
Answer Checked By – Timothy Miller (Easybugfix Admin)