check uploaded file's file size?

h3m4n mrnull at gmail.com
Fri Jul 7 23:35:17 EDT 2006


i have a short script that allows users to upload files, but when i try 
to check for a valid filesize (using fileitem) i get '-1'  i can't find 
information about using filesize anywhere.  any ideas?

code:

form = cgi.FieldStorage()
fileitem = form["datafile"]
print str(fileitem.filesize)

-h3m4n




More information about the Python-list mailing list