Re: [Zope] Upload file size
17 Dec
2000
17 Dec
'00
9:21 a.m.
diego@magicwebdesign.com.br writes:
There's a way to get the size of a file uploaded in a form before write it? I am not sure, what type of object is used at the base of "FileUpload" objects (to give them there file like behaviour).
If this a "cStringIO" objects, they may have a "len" attribute. This means, you could use "your_uploaded_file.len" to get the length. Otherwise, you could try: file.seek(0,2) # positions at the end len= file.tell() # tells the current position (i.e. the length) file.seek(0,0) # positions at the start That's Python code. You can do something equivalent in several DTML commands. Dieter
9241
Age (days ago)
9241
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dieter Maurer