Re: [Flickrfs-users] problem with uploads
Brought to you by:
manishrjain
From: <man...@gm...> - 2006-12-07 19:03:24
|
Thanks Dave, I'll incorporate these changes in flickrfs cvs. -Manish On Thu, Dec 07, 2006 at 01:49:41PM +0000, Dave Holland wrote: > 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 > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Flickrfs-users mailing list > Fli...@li... > https://lists.sourceforge.net/lists/listinfo/flickrfs-users |