You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Antoine PICOLET <an...@sagem.com> on 2004/10/01 17:22:29 UTC

[users@httpd] Réf. : RE: [users@httpd] Forcing documents todownload.

A standard workaround is to change the content-type of these documents to 
"application/force-download". As no browser know how to handle this MIME 
type, they all propose to save it on disk. (note that you could use just 
any other unknown MIME type)

Now the next part is to make Apache serve these files with this content 
type. I guess you could, in your <Directory> definition for the directory 
containing the files to download, use mod_mime directive :
AddType application/force-download .pdf .doc ...    (maybe works with .*)

but I have never tested it myself !

Antoine 








"Jacinto, Alex G (GE Energy)" <al...@ps.ge.com>

01/10/2004 17:01
Veuillez répondre à users
Remis le : 01/10/2004 17:04

 
        Pour :  users@httpd.apache.org
        cc :    (ccc : Antoine PICOLET/DRD/SAGEM)
        Objet : RE: [users@httpd] Forcing documents to download.



do the browser - Save Target As...

is the only solution I can think of

-----Original Message-----
From: Andrew Mull [mailto:andy@go2nhg.com]
Sent: Friday, October 01, 2004 12:03 PM
To: users@httpd.apache.org
Subject: [users@httpd] Forcing documents to download.


Hello,

While this is most likely a client browser concern, hopefully Apache has a
workaround, or someone on the list has figured it out.

I have a site that allows people to "download" non web files (Word, Excel,
PDF, etc).  On some browsers, it will prompt you to save it to disk...on
others, it will open in the browser window (if you have the appropriate
plug-in).

Is there a way to force the file to be downloaded/saved to disk and bypass
the plug-in?

Thanks for any help!

-Andy 


-- 
Andrew Mull
Niemczyk Hoffmann Group
117 Philadelphia Ave
Shillington, PA  19607
www.go2nhg.com



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org