[Zope-dev] File attachment in multipart form.

Tino Wildenhain tino@wildenhain.de
Tue, 24 Jul 2001 09:22:55 +0200


Hi,

dont forget to set ENCTYPE="multipart/form-data"
on the form tag.

Regards
Tino


--On Montag, 23. Juli 2001 19:27 -0500 Andreas Jung 
<andreas@andreas-jung.com> wrote:

> file = REQUEST.form.get('attached_file')
> file.read() # read the file
> file.filename # name of original file
>
> Andreas
>
> ----- Original Message -----
> From: "CHOY,CHARLENE (HP-Boise,ex1)" <charlene_choy@hp.com>
> To: <zope-dev@zope.org>
> Sent: Montag, 23. Juli 2001 18:10
> Subject: [Zope-dev] File attachment in multipart form.
>
>
>> Hi,
>>   I have created a form which will allow user to attach a file with the
>> submission.  I would like to know how should I code so that the server
> will
>> be able to read the attachment instead of just the location of the file.
>> The following is the code that I use to generate my file attachment.
>>
>> <input type="file" name="attached_file">
>>
>
>
>
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )