[gollem] MIME type with file download

Eric Rostetter eric.rostetter at physics.utexas.edu
Wed Oct 1 10:33:53 PDT 2003


Quoting Etienne Goyer <etienne.goyer at linuxquebec.com>:

> On Tue, Sep 30, 2003 at 05:39:58PM -0500, Eric Rostetter wrote:
> > Quoting Chuck Hagenbuch <chuck at horde.org>:
> >
> > > Quoting Etienne Goyer <etienne.goyer at linuxquebec.com>:
> > >
> > > > Is there a mecanism by which we could determine the file's MIME type,
> > > > and set the header accordingly ?
> > >
> > > Our MIME_Magic:: package should do it.
> > >
> > > -chuck
> >
> > Yes, but then the browser would open the file if it knows the type, rather
> > than downloading it as intended...
>
> This is a policy decision, but would'nt it be better if we would let the
> browser make a decision about how to handle a file ?

In your original message, you were refering to the "download" function
of gollem, not the view function of gollem.

For the download function, you should force a download, which is what
the original code and mime types do.

For the view function, you should try to view it, which means you should
associate the correct mime type if possible.  If this isn't being done
or isn't being done as well as possible, then yes it should be fixed.

>  For example, in
> our setup, Gollem is used as a front-end for the management of personnal
> web space.  Right now, there is no way (or is there ?) for the user to
> see the file inline.

What version of Gollem?  In all mine (all cvs versions) the filename will
be clickable if it knows the mime type, and doing so should open it in-line.
The download link is of course to download it, and will not open it in-line.
Now, if gollem doesn't know the mime type, it doesn't make the filename
clickable.  This is the part that needs work.

>  A user could wonder what is the file A056838.jpg,
> click to see it and use the Back button to go back to file management
> view.

Actually the should use the "Home" menu button, but they will probably
use the browser back button if they are a typical user.

>  In Mozilla, currently it automatically pop up a Save dialog, and
> the file type is given as "Binary Executable".  I know it's Mozilla's
> fault to describe application/octet-stream as "Binary Executable", but
> it still feel ... wrong.

What version of gollem is this?  I don't get this when clicking on the
filename, only when clicking on the download link.

> A few ideas, en vrac :
>
> - If the browser is IE, set type as application/x-msdownload to keep to
>   auto-download feature, but set the MIME type to something meaningful
>   with other browser.

Why?  Either you should set the correct mime type or not.  Should not matter
what browser you use.

> - The default MIME type could be configurable in gollem/config/conf.php.

That would be an option.  Most of my unknown files are text files...

> - Beside the "Download" widget, we could have a "View" widget that would
>   send the file along with meaningful MIME type, and keep the download
>   widget doing what it currently do.

That is the filename field.

> Does MIME_Magic add a huge overhead ?  I suppose it have to read at
> least the beginning of the file.

Don't know.

> --
> Etienne Goyer                    Linux Québec Technologies Inc.
> http://www.LinuxQuebec.com       etienne.goyer at linuxquebec.com

--
Eric Rostetter
The Department of Physics
The University of Texas at Austin

Why get even? Get odd!



More information about the gollem mailing list