Uploading images to imageshack.us with Python

Ricardo Sanchez agentriot at gmail.com
Mon Aug 22 03:36:19 EDT 2005


Ok, I solved it with the unvaluable help of a nice guy in the #python
channel.

It is a studid as it gets, replaced

files = [('fileupload', 'b.jpg', open('b.jpg').read())]

by

files = [('fileupload', 'b.jpg', open('b.jpg', 'rb').read())]

because binary files are not opened correctly in Windows XP unless you
specify that they are so.




More information about the Python-list mailing list