Force downolad a file
See original GitHub issueI’m sending a request that send back a file to download with Content-Disposition:attachment;
, however vue-resource is getting it as a string and is not downloading the file.
Any idea how can i force download the file instead?
Issue Analytics
- State:
- Created 7 years ago
- Comments:9
Top Results From Across the Web
How to force a file to download instead of open in the browser ...
One of the questions I get asked relatively often is how to force a file to download instead of opening directly in the...
Read more >6 Ways to Force Download Instead of Opening File in Browser
Check out these 6 simple and straightforward ways to force downloading WordPress files instead of opening in the browser here!
Read more >Force a File to Download (PDF, Image, Audio) Rather than ...
Encapsulating your downloadable items in a zip file will ensure they are forced to download. This is a simple technique that forces the...
Read more >How to force a file to be downloaded | Media Temple Community
To expand force downloads to include other extensions, the following code can be added to the .htaccess file: The code below will force...
Read more >Force to open "Save As..." popup open at text link click for PDF ...
A very easy way to do this, if you need to force download for a single link on your page, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Found this: http://stackoverflow.com/a/35851873
so three things:
Blob
supported in that list of browsers?vue-resource
allow us to setresponseType
?This solution works for me without any form of file corruption.
The responseType is very important. Otherwise only txt files will work. By setting responseType to arrayBuffer, all file types are converted correctly.