|
Posted by Roy A. on 01/13/07 18:37
Graham Stow skrev:
> I have set up a 'downloads' directory on a website, but when I fire up the
> browser and click on the files in it, they open within the browser itself.
> How do I get the 'File Download - Do you want to open or save this file?'
> dialog window to pop up, giving the user the choice of running the file or
> saving it? I've fiddled around with the permissions of both the directory
> and the files themselves, but can't find a setting that works - either the
> user's permission is denied or the file opens in the browser.
The browsers let users decide how to handel files of diffrent types.
You shouln't change the MIME type just to force a download. What you
proberly should do is to serve the files in the downloads directory as
an attachment.
At the web server you couldt ad a Content-Disposition HTTP header for
the downloads directory with the value attachment. If you're not using
a graphical user interface, the syntax is "Content-Disposition:
attachment;".
Navigation:
[Reply to this message]
|