[Zope] Get uploaded file size

Andreas Jung lists at zopyx.com
Wed Aug 2 13:12:39 EDT 2006



--On 2. August 2006 10:13:17 -0700 AnThu Nguyen <Anthu.Nguyen at Sun.COM> 
wrote:

> Hi,
>
> I'm trying to get the size of a file uploaded via an HTML form before
> it's written. "context.REQUEST.file" only accesses the file name, not the
> content. How do I read the contents? Any help will be much appreciated.
>

Read the data into a string and determine the length of the string.

-aj


-- 
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: info at zopyx.com - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting
-------------- 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/20060802/1da32558/attachment.bin


More information about the Zope mailing list