[Zope] can't use new mime type (content_type)

Rob Boyd boydrobh@yahoo.com
Wed, 18 Jun 2003 09:30:14 -0700 (PDT)


Hello,

I'm having problems with uploaded files not getting
their content_type set to their correct mime type. 
Specifically, .jar and .jnlp files.  I added entries
to mimetypes.py for them (application/x-jar and
application/x-java-jnlp-file) in mimetypes.types_map. 
I can now change the content_type property of an
existing File object to these new types.  However,
when uploading a file, OFS.Image first correctly gets
the content_type when init() calls get_content_type,
but then manage_upload resets it to
application/octet-stream. During this second round of
get_content_type, it finds a content_type of
application/octet-stream in the file's headers.  Where
does this come from?  Not the file itself, but the
File object?  Can anyone shed light on this?

Rob

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com