Filenames of cgi-uploaded files
Sposhua
sposhua at my.pc
Mon Jan 10 12:41:56 EST 2000
Newbie CGI script...
Uploading a file from a form - I need to know the filename (to ignore all
non-gif/jpg uploads) and filesize. Can't find anything in the tutorials on
theis :-( Then I guess I upload the pic using
form = cgi.FieldStorage
fileitem = form['picture']
if fileitem.file:
pic_upload = fileitem.file.read()
(adapted from the tutorial, though it doesn't make much sense to me - expecially
the fileitem.file bit)
More information about the Python-list
mailing list