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