Uploading a file via POST ?
Lars von Wedel
vonWedel at lfpt.rwth-aachen.de
Wed Mar 28 14:19:49 CEST 2001
You might want to try cgiupload:
I'm using it for a similar purpose, see if it fits your needs...
Oliver Hofmann wrote:
> 'lo everyone!
> I am trying to write a small client in Python which submits a file
> to a webpage via the POST method. Part of the .html reads:
> <FORM METHOD=POST ENCTYPE=multipart/form-data
> onsubmit="return FSubmitValidation(this)">
> <INPUT TYPE=text SIZE=40 NAME=Email_Address>
> <INPUT TYPE=file NAME=UpLoad_File SIZE=50>
> I've taken a look at urllib.urlopen, however it seems to be limited
> more or less to GET requests. An optional data-argument must be
> in 'standard application/x-www-form-urlencoded format'; since the
> form requires multipart form-data this is probably not going to
> Is there an easy way to upload a file and pass parameters to the
> server script?
> Thanks a lot,
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 342 bytes
Desc: Card for Lars von Wedel
More information about the Python-list