How to make the link downloadable by clicking the left mouse button?

There is a button on this page that says:

http://www.brianfunshine.com/newest-company-narration-demo/

The problem is that it opens the song in the browser, it does not download the song. How to solve this problem?

+4
source share
4 answers

Try adding this to the top of the .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, for example:
<FilesMatch ".(?i:(mp3|pdf))$">

+2
source

Content-Disposition HTTP Header

+4
source

Content-disposition is an extension to the MIME protocol that instructs the MIME user agent on how it should display the attached file.

http://support.microsoft.com/kb/260519

In particular, it looks like this: "content-disposition: attachment; filename = [filename]" is what you want.

http://forums.iis.net/t/1162386.aspx

0
source
  • Right click on this button and
  • Click save link as to open Save As Dialog Box ,
  • Choose ur location to save,
  • When the download is complete, you can play your song.
-3
source

All Articles