I'm trying to upload an image file using rest api jmeter but I'm getting a 400 bad request error. Below are the steps with the screenshots I've followed to upload a file:
Checked the multipart/form data option and sent the post body empty, under the send files with request, specified the path of the image file which I've placed in the jmeter/bin folder, set the parameter name as file which is from the request payload and MIME type as image/jpeg
Http Header Manager with the Authorization- value, Accept-Encoding- value, Connection-Keep Alive, If-Match-2
Result: Got 404 bad request
POST data:
--3yAYhmLPQ-1r98DX3NMZONHWXK0QDp4uuTmlQYEv
Content-Disposition: form-data;
name="file";
filename="SampleJPGImage_2mbmb.jpg"
Content-Type: image/jpeg
Content-Transfer-Encoding: binary
<actual file content, not shown here>
--3yAYhmLPQ-1r98DX3NMZONHWXK0QDp4uuTmlQYEv--