[Zope] Import/Upload ZEXP files PROBLEMS !

Dieter Maurer dieter at handshake.de
Tue Jan 20 15:05:49 EST 2004


Dragos Chirila wrote at 2004-1-20 15:45 +0200:
> ...
>I have a folder in Zope's ROOT called TEST. In this folder I create 2 DTML
>Methods:
>
>'start_html' with the following content: '<table><tr><td>'
>------------                                        -----------------
>
>and
>
>'stop_html' with the following content: '</td></tr></table>'
>-----------                                          --------------------
>
>Now, I export the 2 DTML Methods in 2 zexp files: start_html.zexp and
>stop_html.zexp
> ...
>And now comes THE PROBLEM. The start_html.zexp has 'text/html' content type
>and stop_html.zexp has
>'application/octet-stream' content type !!??
>
>
>
>Why is that?????

When you upload a file, Zope somehow must determine the "content_type":

  *  if the upload specifies the content type explicitely, it is used

  *  otherwise, if the browser reports one, it is used

  *  otherwise, it is guessed guessed based on extension and
     content.

Apparently, something went wrong in your case.

Either correct the "content_type" manually
or check who is responsible (browser or guess).

If the guess is wrong, then from Zope2.7 on, you can
add additional "mime_type" declarations that control
content type guessing.

-- 
Dieter



More information about the Zope mailing list