Download files where content disposition is set #3948
-
|
Hi Greg and team, I was wondering if, where the site serves a content disposition, if a file save dialog could appear and allow the user to download it to their device. I'm testing code with: 'Content-Type', 'application/vnd.ms-excel'
'Content-Disposition', 'attachment;filename="My File.xlsx"'Right now I have to create special routes which serve it up over a GET request with no authentication, and then open it up in a browser in order to debug it. Is there any chance I can download the files via Insomnia? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
|
Would you, perchance, be able to craft a mockbin.org link that replicates the problem? From there, we can start talking about what a "download file" functionality in insomnia might look like. |
Beta Was this translation helpful? Give feedback.
-
|
Just to verify, your use-case would be satisfied if when the request is made, there is a prompt or button that appears or something that you have to click to actually download the file, right? I ask because I'm not sure we'd see it as a security risk or not for insomnia to be automatically downloading files. I imagine we'd probably get a regular opperating-system file-save prompt to appear that would allow you to choose where the file is downloaded. |
Beta Was this translation helpful? Give feedback.
-
|
I just had a look at mockbin and can't see how to replicate a binary file. The use case would be:
|
Beta Was this translation helpful? Give feedback.
-
|
To get the file, you could select
I do this with zip files and it works fine (version 10.3.1) |
Beta Was this translation helpful? Give feedback.
-
|
This does not work in v12.5.0. It appears to be a regression of some kind. File exports as 0 length file. |
Beta Was this translation helpful? Give feedback.



To get the file, you could select
raw > Export raw responseand optionally set the appropriate file extension.I do this with zip files and it works fine (version 10.3.1)