[Zope] filesize of uploaded file
Casey Duncan
cduncan@kaivo.com
Mon, 16 Jul 2001 09:38:37 -0600
Peter Bengtsson wrote:
>
> I know this question's been posted before but I can't find it at nipltd.com
> so I post it again.
>
> How to find the size of a uploaded file?
>
> I've tried:
>
> print getattr(REQUEST['file'],'size')
> and
> print getattr(REQUEST['file'],'filesize')
>
> This works fine though
> print getattr(REQUEST['file'],'filename')
>
> Cheers, Peter
>
Should be something like:
REQUEST.file.headers['Content-Length']
or
REQUEST.file.headers['content-length']
hth,
--
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>