upload file via web form
John Hunter
jdhunter at ace.bsd.uchicago.edu
Mon Mar 10 11:04:08 EST 2003
>>>>> "Trent" == Trent Mick <trentm at ActiveState.com> writes:
Trent> a file upload is involved. Uploading form data when a file
Trent> is involved means that the HTTP POST body must be encoded
Trent> as multipart/form-data. .urlopen() is hardcoded to use a
Trent> Content-Type header of application/x-www-form-urlencoded
Trent> (which is what you want if _no_ file is involved).
My version of the email package (with python 2.2) does not have
email.MIMEMultipart. Has this been moved to another package or
renamed. Unfortunately, I can't use your function because this is
missing.
Thanks,
John Hunter
More information about the Python-list
mailing list