Sunil Malgaya wrote:
Dear JMeter Users,

Seeking your assistance for the problem statement I have.

I am actually trying to download the binaries (word, pdf, excel, pptx,
docm, xlsm etc.) via an api and saving the response in the local folder.
However, when I reviewed the saved binaries, except the pdfs all have
extensions set  as
"vnd.openxmlformats-officedocument.wordprocessingml.Document" for docx and
docm; "vnd.openxmlformats-officedocument.presentationml.presentation" for
pptx;
"vnd.openxmlformats-officedocument.spreadsheetml.sheet" for excel and xlsm

But for the pdf it shows up correctly.

Any ideas on how to fix that in JMeter only? I tried passing the extensions
as above in 'Content-Type' also but still no help. Just an additional
point, when I run the same api via postman, I get the files with the right
extensions; so not sure why JMeter behaves this way.

Thanks in advance for your help.

Files are saved according to their MIME type <https://en.wikipedia.org/wiki/Media_type>, if you don't like to have the MIME type instead of extension - just tick *Don't add content type suffix* box in the Save Responses to a file <https://jmeter.apache.org/usermanual/component_reference.html#Save_Responses_to_a_file> listener, then you will be able to set your own extension instead.

More information: JMeter Performance Testing: Upload & Download Scenarios <https://www.blazemeter.com/blog/jmeter-performance-testing>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to