Search code examples
jmetermultipart

Getting error "the request was rejected because no multipart boundary was found" while uploading the file in Jmeter


I have tried to upload the file in jmeter:

Please find below mentioned details which i passed in request,

Http reuest:

POST: http:${server_name}/attachment

1.File Path : D:\localdrive\test_docs\images.jpg 2.Parameter Name:images.jpg 3.MIME Type:image/jpg

Http Header :

1.Accept :  / ,
2.Content-Type :    multipart/form-data

Response Data :

 {"response":"the request was rejected because no multipart boundary was found"}

could anyone please share the solution on the same .


Solution

  • Got it !!!

    Make sure that below parameter should be mentioned in HTTP request.

    1. Implementation should be HttpClient3.1 or Java (Don't keep it blank)
    2. Content encoding :UTF-8
    3. "Use multipart/form-data for Post" in HTTP sample should be checked.
    4. In HTTP header (Content-Type : multipart/form-data)
    5. for Parameter-name & MIME-type e.g. In browser enter F12 & hit the request , refer the content in Network tab : Inside Param u will get request param for example if param is : HTML contains= Content-Disposition: form-data; name="file"; filename="images.jpg" Content-Type: image/jpeg

    Then Parameter-name :file & MIME-type :image/jpeg should be like this.

    & now its work fine ,That's a great relief for me !!!

    also thanks Anders for ur answer.