[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope
Subject:    Re: [Zope] can't use new mime type (content_type)
From:       Dieter Maurer <dieter () handshake ! de>
Date:       2003-06-20 18:27:18
[Download RAW message or body]

Rob Boyd wrote at 2003-6-18 09:30 -0700:
 > 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.

"OFS.Image.File.manage_upload" uses "OFS.Image.File._get_content_type"
to determine the content type. Apparently, it does not recognize
your type and uses the default.

You probably need to extend the content type map
interpreted by "guess_content_type".


Dieter

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic