Page 1 of 1

Import from Flickr - pictures can`t be imported

Posted: Sun Aug 23, 2009 1:36 am
by wunderkessel
Hello,

thanks for this great plugin. I just installed it to my fresh Serendipity installation and got the following error-message when I tried to import an image:

> Die Datei konnte auf dem Server nicht gefunden werden. Sind Sie sicher, dass die URL http://static.flickr.com/2466/384677275 ... d737_o.jpg korrekt ist?

Translation from german: the image could not be found. The correct URL is:
http://farm3.static.flickr.com/2466/384 ... d737_b.jpg

I think the farm3 subdomain is added by a load-balancer. When I remove it and type in:
http://static.flickr.com/2466/384677275 ... d737_b.jpg
I`ll be automatically redirected to
http://farm3.static.flickr.com/2466/384 ... d737_b.jpg

Is this redirect stopping the plugin to get the image?

For now I changed the function buildPhotoURL and added the subdomain manually but of course it would be better if you could fix the plugin.

thank you - all the best,
Sacha

Re: Import from Flickr - pictures can`t be imported

Posted: Mon Aug 24, 2009 10:06 am
by garvinhicking
Hi!

Thanks for mentioning this! Indeed I believe this is a more general problem where enabling to follow redirects would be the better patch.

Could you check your include/admin/images.inc.php file and search for "$options = array()" at around line 243 and replace it with:

Code: Select all

$options = array('allowRedirects' => true, 'maxRedirects' => 5);
HTH,
Garvin