I am trying to perform a file upload operation using jmeter for an API POST method. In Jmeter it requests results in 403 but in webpage it is 200.
Referred as many online resources and given multiple attempts i am not able to crack the solution.
How to handle the below form data in jmeter 4.0, As you could notice, there are 2 things, files and filedetails. How to handle this ?
I have also included the header value. Please look into it.
Below is the form data of POST METHOD:
------WebKitFormBoundarylyJiQdD1alYKbAKW Content-Disposition: form-data; name="files"; filename="Sample_Report.pdf" Content-Type: application/pdf
------WebKitFormBoundarylyJiQdD1alYKbAKW Content-Disposition: form-data; name="filedetails"
{"serviceRequestId":"RandomNumber","filedetails":[{"fileName":"Sample_Report.pdf","fileUniqueName":"Randomnumber-a575d680-ceb0-11e9-a25d-2590f89b0ed0.pdf","fileType":"application/pdf","fileSize":1117730,"status":"New"}]} ------WebKitFormBoundarylyJiQdD1alYKbAKW--
Request Headers:
Content-Type: multipart/form-data; boundary=----WebKitFormBoundarylyJiQdD1alYKbAKW
I should be able to upload a single / multiple file through the JMeter.