s10v10s
s10v10s

Reputation: 73

How to send text file to a http request which shows error "request was rejected because no multipart boundary as found"

I am having some issue in file uploading with jmeter

I hav added the parameter in http header manager and uploaded .txt file and I am hitting a http request.

Parameters

Sampler Request giving request code 200

Response data is shown below:

Could not parse multipart servlet request; nested exception is org.apache.commons.fileupload.FileUploadException: the request was rejected because no multipart boundary was founderror

Upvotes: 0

Views: 1007

Answers (2)

s10v10s
s10v10s

Reputation: 73

It was resolved.

  1. Add Http cookie manager
  2. Add all parameters inside parameters section of http request
  3. Add file mime type text/plain

Thanks everyone for your support.

Upvotes: 0

Dmitri T
Dmitri T

Reputation: 168072

  1. Make sure you provide full path to the file being uploaded under "Files Upload" tab of the HTTP Request sampler
  2. Make sure you tick Use multipart/form-data for POST box
  3. Make sure "Parameter Name" matches the "name" attribute of the relevant File HTML Input field.

    JMeter File Upload


In the absolute majority of cases it is much easier to just record your file upload event using JMeter's HTTP(S) Test Script Recorder, just make sure you copy your file(s) to JMeter's "bin" folder prior to recording the request itself, see Recording File Uploads with JMeter article for more details.

Upvotes: 1

Related Questions