Reputation:
I am trying to upload a file (this file may be csv, xls or xslx), when I am trying it I am getting :
{
"traceId": "|c21666c9-451856316af3f762.",
"type": "https:\/\/tools.ietf.org\/html\/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"errors": {
"": [
"Failed to read the request form. Missing content-type boundary."
]
},
"status": 400
}
Here are the below configuration I have done in Jmeter, could someone help me what I have missed here
Upvotes: 1
Views: 11066
Reputation: 168147
It's hard to say what exactly went wrong without seeing full request details from browser and JMeter, if you compare them (better using an external sniffer tool like Fiddler) you should be able to figure out what are the inconsistencies and what needs to be done in order to fix them.
Going forward be aware that you can simply record the file upload request using JMeter's HTTP(S) Test Script Recorder, just make sure to copy the file you're uploading to "bin" folder of your JMeter installation, this way JMeter will be able to properly capture the request and generate the relevant HTTP Request sampler and HTTP Header Manager.
More information: Recording File Uploads with JMeter
Upvotes: 0
Reputation: 2076
There are few changes you need,
First: the parameter window is not required. (remove it)
Second:
Could you please add Referer
and Origin
in the header manger? And remove content-type
from the header manger, guess this will fix your issue.
Upvotes: 1