Re: serving up blobs for download
| From: | Rob Montgomery | Date: | Sun, 09 Jul 2000 22:31:13 +0000 |
| Subject: | Re: serving up blobs for download | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5655@lists.php.net to get a copy of this message | ||
Matthew Kendall wrote:
>
> "Rob Montgomery" <Robert.L.Montgomery@Home.com> wrote...
>
> > The reason for the 2 distinct links is because if the remote user
> > DOES have a pdf viewer installed, clicking on the link will always
> > start the PDF viewer, which does not have a way to save the file
> > either.
>
> Err, yes it does? The PDF Viewer plug-in displays a toolbar at the top with
> a floppy disk button that performs this function. At least on my setup it
> does.
My linux version of acroread will only open a file using that floppy disk
button. The only way to save a file would be to "print" it to a file
instead of a printer (which is still much more work than I want for simply
downloading a file). I admit I probably have an old version of acroread
for linux, so maybe now its more like the windows version.
> > You mentioned that it is ultimately up to the browser as to
> > how to handle the content, and that we have no control over that.
> > Well isnt that exactly why we have standardized content-types in the
> > first place, so that we CAN have some control over these things?
>
> Well, no. The content-type describes the type of the content (duh), not what
> action is to be taken with it. Once the browser knows what it _is_ it will
> decide for itself what to _do_.
Of course I realize that the content-type describes the type. But the
type of file dictates the potential actions. You wouldnt expect a PDF
file to open in your real audio player would you? But my point is that
I was hoping to find a content-type like "generic-file" which would
explicitly mean that the content was to be saved as a file and not
interpreted in any other way by any other program. Netscape takes the
logical approach that if it doesnt recognize the type, just save the damn
thing as a file instead of crapping out like IE does. I get 2 different
behaviors using IE5.00 on 2 different win98 boxes. One will allow me
to download the file using the content-type: application/x-msdownload,
while the other doesnt....
> > By the way, thanks for the newsgroup, I will definitely look there.
> > If there is a way to do this (exploit or not), then I guess that is
> > exactly what I'm looking for...
>
> Allen Flavell is one of the more knowledgeable people in that group, and he
> has a web page you may find useful in explaining the behaviour you are
> seeing in MSIE.
>
> http://ppewww.ph.gla.ac.uk/~flavell/www/content-type.html
Thanks, will do.
Rob