[thelist] Playing with MIME type (was: Downloading .jpg & .pdf files)

Jakob Dölling alligotar at gmx.net
Mon May 21 15:29:50 CDT 2001


Joe Crawford schrieb:

> > With an NCSA-compatible server like Apache, you simply put a files
> > in a special download-only directory, and stick an .htaccess file in
> > that directory for each file type:
> >     AddType application/octet-stream jpg
> >     AddType application/octet-stream pdf
> >
> > Since the application/octet-stream MIME type is simply a stream of
> > 8-bit data of unknown use, there aren't going to be any applications
> > set up to open it. If you want to have fun, you can use
> >     AddType application/evolt-download-only jpg
> >     AddType application/evolt-download-only pdf
> > or even
> >     AddType be/mine jpg
> >     AddType true/love pdf
> Is this going to work on IE/Windows? It's my understanding that IE makes
> guesses about files with strange MIME types based on the extension. Have
> you used this successfully? It's an interesting and clever shorthand  (I
> like!) - but does it work to bring up the "prompt to save" box for most
> browsers in a reliable way? And does doing it this way impact Macintosh?
> It seems like feeding an unknown mime type might make it unviewable (to
> most users) on the Mac side.

be calm, it will. This is not HTML as you might not noticed, these are
instructions for *server* how it has to deliver data. If have installed
Acrobat and you follow link that refers to pdf file, normally the
browser plugin of Acrobat kicks in and displays the file. This is the
default scenario. But if you tell your server to deliver as binary data,
you'll be prompted in your browser where you would to store the files.
That's the difference.

Hope you're satisfied,


To Unix or not to Unix. That is the question whether 'tis nobler in the
mind to suffer slings and arrows of vast documentation or to take arms
against a sea of buggy OS and by raping the support lines end then?

More information about the thelist mailing list