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'. How do I change the identification of these files afterwards, and how can I change the Product's autodetection for the next files to upload? I use ExtFile Version 1.1.3. -- Best Regards, Marc Roland AICAT CA Technologies GmbH Dipl.-Ing.(FH) System Consultant Friedrich-Karl-Str. 101-103 Fon:+49/(0)221/971445-0 Fax:-5 Germany-50735 Koeln (Niehl)
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
participants (2)
-
Dieter Maurer -
Marc Roland