Posted By

manuelpedrera on 06/02/11


Tagged

filetype download force


Versions (?)

Force filetype download


 / Published in: Apache
 

When offering some files such as mp3s, eps or xls, for download on your site, you may force download instead of letting the browser decide what to do. This snippet will force the download of .xls and .eps files from your server.

  1. <Files *.xls>
  2. ForceType application/octet-stream
  3. Header set Content-Disposition attachment
  4. </Files>
  5. <Files *.eps>
  6. ForceType application/octet-stream
  7. Header set Content-Disposition attachment
  8. </Files>

Report this snippet  

You need to login to post a comment.