[Zope] How to read a file object

Andreas Jung lists at andreas-jung.com
Wed Jun 1 07:18:50 EDT 2005



--On 1. Juni 2005 12:03:39 +0100 John Poltorak <jp at warpix.org> wrote:

> On Wed, Jun 01, 2005 at 12:46:44PM +0200, Andreas Jung wrote:
>>
>>
>> --On 1. Juni 2005 10:01:22 +0100 John Poltorak <jp at warpix.org> wrote:
>>
>> >
>> >
>> > How do I go about reading a Zope file object in Python?
>>
>> Define what "reading a Zope File object" means? You mean you want the
>> body of an upload file?
>>
>> -aj
>
>
> I mean the thing that is created when I click on 'File' from the drop
> down  menu of ZMI.
>
>

When you upload a file through HTTP upload then you can access the body
as context.REQUEST['yourfile'].read(). Means the uploaded file is 
temporarily stored as file like object...I am pretty sure this is explained 
in the Zope Book *wink*.

-aj

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20050601/c9866c9f/attachment.bin


More information about the Zope mailing list