Uploading binary files
Chris Biegay
cbiegay at objectmentor.com
Fri Jun 30 12:46:49 EDT 2000
I'm trying to upload files through an HTML form, but it only works
for text files. When I try to send a jpeg or something the process just
hangs, and I can't even change the script afterward since the webserver
won't release the file! Any ideas? This is basically how I'm doing it now:
form = cgi.FieldStorage()
formItem = form[inputName]
if formItem.file:
print "Received file [" + formItem.filename + "]"
data = formItem.file.read()
...
More information about the Python-list
mailing list