[Zope-dev] Re: Uploading part of a product in constructor method

Alexandre Ratti alex@gabuzomeu.net
Sun, 02 Apr 2000 17:33:32 +0200


Hello Andrew,


Did you specify enctype="multipart/form-data" in your FORM tag?

Here is an example from a ZClass I use:

   <FORM action="PDFFileClass_add" enctype="multipart/form-data"
     method="post">
     ...
     <INPUT type=file name="file" size="30">
     ...
     </FORM>


HTH.

Alexandre


At 12:00 01/04/2000 -0800, you wrote:
>Date: Sat, 1 Apr 2000 17:37:34 +0600
>From: Andrew Golovin <exper@inbox.ru>
>Subject: [Zope-dev] Uploading part of a product in constructor method

>   I'm  trying to create a product to store HTML-file with comment and
>    title fields. In product i have file with id "text". Add form looks:
>
>     ...
>     <tr><th>File</th>
>         <td><input type="file" name="file"></td>
>     </tr>
>     ...
>
>    Add method:
>
>     ...
>     <dtml-with "manage_clone(ArticleClass,REQUEST['id'],REQUEST)">
>     <dtml-call "text.manage_upload(REQUEST['file'])">
>     ...
>
>    After  adding  instance  of product in folder i have path string in
>    file  text instead of downloaded html-source. what i'm doing wrong?
>    don't  tell  me to use python external method in product. i want to
>    do it in terms of dtml.