Bug Fix: Post-Upload Problems

Posted on Friday 29 September 2006

Here's a quick bugfix for those of you who don't plan to upgrade to version 2.0.0 right away (because it'll break your apps). If you upload a file, you'll get an error on any Flickr methods you try to call after this. This is because the HTTP_Request object changes the post encoding when you upload a file and there's no systematic way to change it back. You can, however, throw the switch manually. Just stick the following code before the return statement in all of your upload functions in phpFlickr

$this->req->_requestHeaders['content-type'] = 'application/x-www-form-urlencoded';
unset($this->req->_postFiles['photo']);


1 Comment for 'Bug Fix: Post-Upload Problems'

  1.  
    September 29, 2006 | 12:59 pm
     
    Friday FURIOUS Flickr Fun... Re-did the main page of The One True b!X to display a 5x5 grib of square thumbnails for the 25 most recent photos I've uploaded to Flickr....

Leave a comment

(required)

(required)


Information for comment users
Line and paragraph breaks are implemented automatically. Your e-mail address is never displayed. Please consider what you're posting.

Use the buttons below to customise your comment.


RSS feed for comments on this post | TrackBack URI