AnThu Nguyen wrote at 2006-8-2 10:13 -0700:
> ...
>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.

If "context.REQUEST.file" is the file name and not a
"ZPublisher.HTTPRequest.FileUpload" object, then you
are doing something wrong. Either you use an HTTP "GET" request
or you do not use "multipart/formdata" as mime type.

A "FileUpload" object behaves like a file and you can
use the usual way to determine its size.

Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to