[Zope] File Upload returns "application/octet-stream", not correct type

Dieter Maurer dieter@handshake.de
Sat, 4 Aug 2001 02:52:42 +0200 (CEST)


Joel Burton writes:
 > This is possibly a browser error, rather than a Zope error, but I can't
 > find any references on the web for a browser bug.
 > 
 > When we upload to Zope (via a form that we build, or by simply adding a 
 > "File" object through the management interface), it comes out as
 > "application/octet-stream" rather than as the appropriate MIME type.
 > This only happens on one computer (Win 98, IE 4), suggesting a browser
 > bug, but I can't find any references on the web about a problem with this.
 > 
 > Does Zope do any mangling at all of MIME types? Does anyone have any ideas
 > what this could be?
Zope (--> 'OFS/Image/File/_get_content_type') uses the
"Content-Type" header of the uploaded file (if present).
Otherwise, it tries to guess the content type based on
filename extension, otherwise it defaults
to "application/octed-stream" (if it contains binary data)
or "text/x-unknown-content-type".


Dieter