check uploaded file's file size?

h3m4n mrnull at gmail.com
Sat Jul 8 16:56:54 EDT 2006


> Try this
> 
> fileitem.seek(0, 2)  # Seek to the end of the file.
> filesize = fileitem.tell()  # Get the position of EOF.
> fileitem.seek(0)  # Reset the file position to the beginning.

thanks for the info.  i just had to change it from fileitem to 
fileitem.file, e.g. fileitem.file.seek(0, 2), and it worked fine.

- h3m4n



More information about the Python-list mailing list