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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    downloading a file.

    Whenever I would link a mp3 or media file, on the user side, that means they get a request to open it, and that's what their computers do, without actual option to save.

    From what I understand, this is server setting issue, however, i can't figure which one, seems like usually people get the opposite problems, where they're asked to save the .php file and such, what I'm trying to accomplish is the total opposite.

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    Try something like this:
    Code:
    <FilesMatch ".(?i:mp3)$">
    ForceType application/octet-stream
    <IfModule mod_headers.c>
    Header set Content-Disposition attachment
    </IfModule>
    </FilesMatch>
    I don't have time to test it right now, but it should give you a starting point.


  •  

    Posting Permissions

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