Uploading files through HTML

Chris Biegay cbiegay at objectmentor.com
Fri Jun 30 11:17:07 EDT 2000


I'm trying to upload a binary file through an HTML form, but it only works
for files smaller than a few kb.  I tried changing the buffer size in cgi.py
but it hasn't helped.  Any ideas?  This 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