Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    May 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Force download dialog

    I need to force a link to open the download dialog box instead of opening in the browser. I have tried adding each of these to .htaccess:

    Code:
    AddType application/octet-stream .mp3
    Code:
    <Files *.mp3>
    ForceType application/octet-stream
    Header set Content-Disposition attachment
    </Files>
    Code:
    <FilesMatch "\.(?i:mp3)$">
      ForceType application/octet-stream
      Header set Content-Disposition attachment
    </FilesMatch>
    With no result. In fact, the only thing that has gotten me anywhere is

    Code:
    ForceType application/octet-stream
    Header set Content-Disposition attachment
    which forces every page on the site to download, which is obviously not what I want. I have seen implications that I may need to enable mod_header, but I have not found any instructions on how to do that.

    Please don't say to just tell the user to right click+save as, because this is not an acceptable solution to the client. If I could just put up that message, I wouldn't have spent the past week trying to solve this. Also, .zip files are out.

    Thanks.
    Last edited by Slazenger; 05-04-2011 at 07:29 PM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •