0
votes

I am unable to upload a .zip file from Jmeter.

Upon trying to upload the file i am getting an error like below,

{
  "args":[
    "unsupportedMediaType"],
  "message":"Request media type is not supported",
  "messageId":"unsupportedMediaType",
  "correlationId":"6539cd74-5f09-473c-40d2-36f98c0a472b",
  "causes":[
  ],
  "status":415
}

HTTP Method supported: POST.

Request header:

Content-Type: application/json; charset=UTF-8

Can anyone please help me in uploading the .zip file from the Jmeter, refer to the below image for my request,

enter image description here

Thanks in advance.

1

1 Answers

2
votes

Are you sure about your content-type and what you are doing ?

  • for zip content type application/json is wrong.
  • fileToString will try to transform byes(zip) to text which cannot work

Try

  • checking Use multipart/form-data for Post
  • and Browser compatible headers .
  • remove FileToString call and use last tab Files upload instead of body data. And use there the content type application/zip or something suitable

If you are trying to upload a file and send a body, you may need to use nightly build.