[Zope-dev] File attachment in multipart form.

Andreas Jung Andreas Jung" <andreas@andreas-jung.com
Mon, 23 Jul 2001 19:27:15 -0500


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">
>