Automatic file downloads: summary

Subject: Automatic file downloads: summary
From: "Hart, Geoff" <Geoff-H -at- MTL -dot- FERIC -dot- CA>
To: "Techwr-L (E-mail)" <TECHWR-L -at- lists -dot- raycomm -dot- com>
Date: Thu, 21 Aug 2003 12:11:39 -0400

A few days ago, I asked whether it was possible to configure an HTML link so
that a file (specifically a PDF in my case) would be downloaded to the
browser's hard disk (i.e., open up a "Save as" dialog) rather than launching
the helper application (in my case, the Acrobat Reader plug-in for Internet
Explorer). The goal is to make the full range of Acrobat features available
rather than forcing people to use the crippled version of Reader that runs
inside IE.

I got very few responses, but here's the summary of what I did get:

One possibility is to tell the browser that the file isn't really PDF by
changing the MIME type that the Web server sends in the header to
"application/octet-stream" (from "application/pdf "). With an Apache server,
you can put the PDF files in a special directory, and add a .htaccess file
to that directory to override the server's MIME settings. That file holds
the following command: AddType "application/octet-stream". Not sure how to
do this with Microsoft IIS.

Another possibility is to replace HTTP with FTP in the link code. In theory,
this should invoke the FTP client rather than the Reader plug-in, but it
seems too simple to work. I'll see if I can find time in the next month (if
I'm lucky) to actually try this. Feedback welcome from those who have done
so.

With a JSP-capable Web server, it should be possible to control link
behavior by tweaking the JSP settings (no details were provided). Yet
another possibility is to alter the behavior of all links on a page. One
description of this approach can be found at:
http://www.javascriptkit.com/howto/htaccess9.shtml

Thanks to David Castro, John Posada, and Jim Royal for their suggestions.
(If you wrote to me and didn't get a response, it's because I didn't see
your note. Spam filters are horrid things if you have no control over how
they're configured. Sorry!)

--Geoff Hart, geoff-h -at- mtl -dot- feric -dot- ca
(try ghart -at- videotron -dot- ca if you get no response)
Forest Engineering Research Institute of Canada
580 boul. St-Jean
Pointe-Claire, Que., H9R 3J9 Canada

"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my
telephone."--Bjarne Stroustrup (originator of C++ programming language)




Previous by Author: Print-ready graphics problem?
Next by Author: Please explain this phrase? (self-respecting)
Previous by Thread: Re: Of punctuation, ethics and interviews...
Next by Thread: Acrobat 6 complaints


What this post helpful? Share it with friends and colleagues:


Sponsored Ads