On Wed, Dec 06, 2006 at 01:43:20PM +0000, I wrote:
> I've just downloaded flickrfs from CVS and it works well, with one
> exception: I'm not able to upload photos.
I figured this out; the upload routine wasn't sending "\r\n" after the
binary JPEG data and before the MIME boundary. Here's a diff. Uploading
images works just fine for me with this in place.
diff -u -r1.7 flickrapi.py
--- flickrapi.py 26 May 2006 01:13:41 -0000 1.7
+++ flickrapi.py 7 Dec 2006 13:42:21 -0000
@@ -357,7 +357,7 @@
jpegData = fp.read()
fp.close()
- postData = body.encode("utf_8") + jpegData + \
+ postData = body.encode("utf_8") + jpegData + "\r\n" + \
("--%s--" % (boundary)).encode("utf_8")
Cheers,
Dave
|