You're supposed to provide an example successful request and the file
you're uploading, it can be captured using a sniffer tool like Wireshark
<https://www.wireshark.org/> or Fiddler
<https://www.telerik.com/fiddler>, only this way we'll be able to come
up with the relevant JMeter configuration required to replicate the request.
In the mean time I can only suggest trying recording the request using
JMeter's HTTP(S) Test Script Recorder
<https://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.html>
1. Start JMeter's HTTP(S) Test Script Recorder
2. Import JMeter's certificate into your browser (or system
certificates storage if the upload is being performed by other
application), see *HTTPS recording and certificates* chapter of
JMeter's documentation on HTTP(S) Test Script Recorder
<https://jmeter.apache.org/usermanual/component_reference.html#HTTP(S)_Test_Script_Recorder>
3. Copy the file you're going to upload to "bin" folder of your JMeter
installation (or JMeter's current working directory if you're
launching it from a desktop shortcut or whatever), see Recording
File Uploads with JMeter
<https://www.blazemeter.com/blog/recording-file-uploads-jmeter> for
more details
4. Perform the upload in the browser (or other application)
5. JMeter should intercept the request and generate proper HTTP Request
<https://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request>
sampler and HTTP Header Manager
<https://jmeter.apache.org/usermanual/component_reference.html#HTTP_Header_Manager>
On 1/26/2022 10:51 AM, Jayashree Jayagopi wrote:
Hi team,
I have a very peculiar scenario where the raw data of the file has to
be sent. I have tried following options and still wasn't successful.
- Http Request with form-data disabled but still its sending as
multi-part which is not acceptable by the system
- Sending the file contents in request body by following methods .
They were successful however the file uploaded was encoded in some
format so the MD5 hash of the original file and uploaded file doesn't
match. Hence the uploaded file looked different from original
- FileToString Method
- Reading the file using HTTP request . Capturing the response and
passing to the body of File upload request
- Using Https Raw data . Since its https request, it cannot be used.
- All possible encoding formats available but nothing worked as the
application just expects the raw data without any encoding.
Regards
Jayashree