Re: Uploading a file using POST

2009-03-19 Thread Vijayendra Bapte
On Mar 19, 7:20 am, Justin Ezequiel wrote: > On Mar 19, 8:50 am, Thomas Robitaille > wrote: > > > I am trying to upload a binary file (a tar.gz file to be exact) to a   > > web server using POST, from within a python script. > > > What I would like is essentially the equivalent of > > > > enctyp

Re: Uploading a file using POST

2009-03-18 Thread Justin Ezequiel
On Mar 19, 8:50 am, Thomas Robitaille wrote: > I am trying to upload a binary file (a tar.gz file to be exact) to a   > web server using POST, from within a python script. > > What I would like is essentially the equivalent of > > enctype="multipart/form-data"> > > have you seen http://code.ac

Uploading a file using POST

2009-03-18 Thread Thomas Robitaille
Hello, I am trying to upload a binary file (a tar.gz file to be exact) to a web server using POST, from within a python script. At the moment I am trying URL="http://www.whatever.com"; f=open(filename, 'rb') filebody = f.read() f.close() data = {'name':'userfile','file': filebody} u = urllib