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.
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 or 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