Reputation: 55263
In this page I have a button which says download:
http://www.brianfunshine.com/newest-company-narration-demo/
The problem is that it opens the song in the browser it doesn't download the song. How to solve that issue?
Upvotes: 4
Views: 1022
Reputation: 45589
Try adding this to the top of your .htaccess file:
<FilesMatch “.(?i:(mp3))$”>
<IfModule mod_headers.c>
ForceType application/octet-stream
Header set Content-Disposition attachment
</IfModule>
</FilesMatch>
If you want to force download another type of file (say pdf?), just add it next to mp3, like this
<FilesMatch “.(?i:(mp3|pdf))$”>
Upvotes: 2
Reputation: 8402
Content-disposition is an extension to the MIME protocol that instructs a MIME user agent on how it should display an attached file.
http://support.microsoft.com/kb/260519
More specifically, it looks like "content-disposition: attachment; filename=[filename]" is what you want.
http://forums.iis.net/t/1162386.aspx
Upvotes: 0
Reputation: 1830
save link as
it will open a Save As Dialog Box
, Upvotes: -4