Re: [Tutor] POST MULTI PART DATA WITH PYTHON

2013-05-15 Thread Japhy Bartlett
In your code, you're not actually inserting the contents of the file into your MIME part (you're only constructing headers), which is why the content-length is not right. The 404 is probably the site detecting this as a script/robot/violation of their TOS and blocking you. Which you can probably

[Tutor] POST MULTI PART DATA WITH PYTHON

2013-05-06 Thread Ajin Abraham
Hi, I was working on a python project that requires to upload an image using httplib. Here i need to POST a MULTI PART DATA with Python using inbuilt libraries. I know there are better libraries like requests and poster. but i need to do it with httplib itself. I will attach a screenshot==

Re: [Tutor] POST MULTI PART DATA WITH PYTHON

2013-05-06 Thread Ajin Abraham
Actually i figured out the content length problem and modified the source a bit. http://bpaste.net/raw/lax7e7qMLY3bKM69su9k/ but still there is 404 not found problem My requirement is this. With httplib, i need to upload a file (png) with python at

Re: [Tutor] POST MULTI PART DATA WITH PYTHON

2013-05-06 Thread Prasad, Ramit
Please post your comments after quoted text (either bottom posting or in-line) not before (top posting). I have fixed the order below. On Mon, May 6, 2013 at 10:35 PM, Ajin Abraham aji...@gmail.com wrote: Hi, I was working on a python project that requires to upload an image using