[Zope] ExtFile Product and mime-types

Dieter Maurer dieter@handshake.de
Fri, 31 Jan 2003 21:26:53 +0100


Marc Roland wrote at 2003-1-31 11:30 +0100:
 > After importing a new file via PythonScript
 > manage_addProduct['ExtFile'].manage_addExtFile(id, title, descr, file)
 > some files have automatically the Content-Type
 > 'application/octet-stream'.
When I remember right, you can pass the content-type into the
"manage_addExtFile" (when you know it, e.g. from the
"header" of the "FileUpload" instance).

 > How do I change the identification of these files afterwards,
either via the ZMI or with a "manage_changeProperties" call.

 > and
 > how can I change the Product's autodetection for the next files to
 > upload?
You must extend the method that guesses the Mime type.
Look at the source to locate this function.


Dieter