Uploading albums direction from google picasa

Creating and modifying plugins.
greenwayg
Regular
Posts: 34
Joined: Wed Jan 02, 2008 8:25 pm

Re: Uploading albums direction from google picasa

Post by greenwayg »

Yes, Picasa is requiring that it is a zip file with the .pbz extension. If not, Picasa won't recognize the file at all. See http://code.google.com/apis/picasa/docs/button_api.html for details.

I will write the example() method, since that seems like the easiest way to deal with this without having zip file support in php/s9y.

Also, I realized that the picasa_upload() method should probably have the following at the top:

Code: Select all

        if(!serendipity_userLoggedIn())
        {
            $this->report_upload_result('You must be logged in to upload an album.');
        }
Can you put that into source control? Seems like a big security hole without that. I think the only way a user could hit that case under normal circumstances is if they open the upload page in picasa, then open another internet explorer window, go to their blog, and explicitly log out, then try to finish uploading in picasa. But someone could upload arbitrary files without the loggedIn check.

thanks,
greg
greenwayg
Regular
Posts: 34
Joined: Wed Jan 02, 2008 8:25 pm

Re: Uploading albums direction from google picasa

Post by greenwayg »

The new versions of the .php files, and the new pbz file are now at http://www.wreck.org/~greg, if you want to take a look.

thanks,
greg
greenwayg
Regular
Posts: 34
Joined: Wed Jan 02, 2008 8:25 pm

Re: Uploading albums direction from google picasa

Post by greenwayg »

Sometime while developing the upload code, I broke the uploading of captions with images. I fixed it, and put the new version in the usual place: http://www.wreck.org/~greg/serendipity_ ... sa.php.txt

Hopefully this will be the last change I need to make to this plugin for awhile.

thanks,
greg
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Uploading albums direction from google picasa

Post by garvinhicking »

Hi!

Great, I uploaded it. Note that it's njow version "1.8" instead of "1.5" :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
greenwayg
Regular
Posts: 34
Joined: Wed Jan 02, 2008 8:25 pm

Re: Uploading albums direction from google picasa

Post by greenwayg »

I recently ran into a problem with my plugin: I tried uploading quite a few pictures, and I noticed that it seemed to have a cap of 50 files being uploaded in one POST. Any idea what might be setting that limit? I figure it could be PHP, apache, or Picasa. When I try to upload more, it behaves like the ones after the first 50 had never been selected. They just never show up on the server.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Uploading albums direction from google picasa

Post by garvinhicking »

Hi!

This might be caught by your PHP's max_upload setting and/or the post_max_size setting. 50 files though seems more like a picasa limit, if it's such a straight number...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
greenwayg
Regular
Posts: 34
Joined: Wed Jan 02, 2008 8:25 pm

Re: Uploading albums direction from google picasa

Post by greenwayg »

Hi,

I found the beginning of the answer in the error log on the server, which combined with a bit of searching yielded this page:

http://zdp.us/blog/view/id/88

So I'll need to talk to my server administrator. Thanks for the help.

greg
matter
Regular
Posts: 9
Joined: Mon Feb 22, 2010 2:59 pm

Re: Uploading albums direction from google picasa

Post by matter »

Hey All,

I just installed and configured the Picasa plugin as directed, however the uploading is not working- but no error is visible in the picasa window, and nothing shows up in the server logs. Does this plugin keep its own log? Is there a serendipity log I can check?
greenwayg
Regular
Posts: 34
Joined: Wed Jan 02, 2008 8:25 pm

Re: Uploading albums direction from google picasa

Post by greenwayg »

Hi,

The plugin doesn't keep any extra logs of its own. I don't think there is any s9y log, just the server log.

How far did you get in the upload process? Did the upload button appear in picasa? Did you see the login window in the mini-browser in Picasa? Did you fill in the name and description?

greg
matter
Regular
Posts: 9
Joined: Mon Feb 22, 2010 2:59 pm

Re: Uploading albums direction from google picasa

Post by matter »

greenwayg wrote: How far did you get in the upload process? Did the upload button appear in picasa? Did you see the login window in the mini-browser in Picasa? Did you fill in the name and description?
The button is there,
The login window pops up and authenticates,
The album name and description and everything works, and when I hit upload, it shows a blank page with this URL at the top:
http://mattrosales.com/index.php?/plugi ... sing+files

Any ideas?

Thanks!
m
greenwayg
Regular
Posts: 34
Joined: Wed Jan 02, 2008 8:25 pm

Re: Uploading albums direction from google picasa

Post by greenwayg »

Ok, that helps. I'm surprised the page is blank; It should have said "Missing files". But the URL tells me the needed information.

In PHP-speak, that means that $_FILES is empty, which is what PHP is giving this script as the set of files that were uploaded. I don't know enough about PHP to know what could cause that, but google led me to http://getluky.net/2004/10/04/apachephp ... usly-empty. Anybody else out there have effective trouble-shooting suggestions for why $_FILES might be empty?

Another question for matter: on the page where you enter the album name/description, is there a preview of all the images you've selected for upload? If not, what version of picasa are you using? How many images did you have selected, or in the little tray in the bottom-left of picasa?
matter
Regular
Posts: 9
Joined: Mon Feb 22, 2010 2:59 pm

Re: Uploading albums direction from google picasa

Post by matter »

greenwayg wrote: Another question for matter: on the page where you enter the album name/description, is there a preview of all the images you've selected for upload?
Yes, the images all show fine
greenwayg wrote: If not, what version of picasa are you using? How many images did you have selected, or in the little tray in the bottom-left of picasa?
I'm using Picasa 3.6.2 on OS X 10.6. I've experimented a bit with different numbers of photos; 1 photo and 40 photos both have the same effect.

Thanks for helping me debug this!
greenwayg
Regular
Posts: 34
Joined: Wed Jan 02, 2008 8:25 pm

Re: Uploading albums direction from google picasa

Post by greenwayg »

Hi,

Were you able to check any of the things in the link in my last post? Specifically, make sure your php settings allow uploads, and that the size limits are large enough, and there is enough disk space in your /tmp directory.

Is there any output in your server logfiles related to this? When you click the final upload button, does picasa think for awhile and say it is processing and uploading the files? Or does it immediately show the Missing Files page?

One possibly relevent difference between your setup and mine is that I'm using windows and you are using OS X. Not sure if it's relevent or not. Is your webserver apache, or something else?

greg
matter
Regular
Posts: 9
Joined: Mon Feb 22, 2010 2:59 pm

Re: Uploading albums direction from google picasa

Post by matter »

greenwayg wrote:Specifically, make sure your php settings allow uploads, and that the size limits are large enough, and there is enough disk space in your /tmp directory.
I had the size limits of uploads at 256M, but I just upped it to 512M, and changed the input_time and execution_time to 240.

I checked the uploads, and the maximum size was 2M, so I bumped that up to 10M, and did the same to the post size, all with no luck. I can load picasa on my windows box and try that too, just to check, but I might have to put it on the back burner for a day or so.
greenwayg wrote: Is there any output in your server logfiles related to this?
Nope.
greenwayg wrote: When you click the final upload button, does picasa think for awhile and say it is processing and uploading the files? Or does it immediately show the Missing Files page?

No, the missing files page is instantly displayed.
greenwayg wrote: Is your webserver apache?
The webserver is indeed apache, but I use hostmonster, not self-hosted, if that's what you were wondering.

I am thinking that perhaps hostmonster has permission problems on /tmp? I will try loading picasa on a windows computer and uploading from there, unless you have any other suggestions in the mean time? Thanks for the tips!
greenwayg
Regular
Posts: 34
Joined: Wed Jan 02, 2008 8:25 pm

Re: Uploading albums direction from google picasa

Post by greenwayg »

Hi,

My suspicion is that the mini-browser in picasa is not trying to upload the images like it should. When I hit the final upload on my computer, even if I only have a handful of images I am uploading, a little docked window-thingy shows up on the right-hand side that says "preparing for upload" and then "posting" or something like that. I presume during that time it is doing the resizing of the images. It takes probably a minimum of 5-10 seconds for small numbers of images, and a few minutes for more images. If you aren't seeing anything like that, then I think that is the problem.

The documentation I used for writing the plugin is from here: http://code.google.com/apis/picasa/docs ... oader.html. It talks specifically about the mini-browser being internet explorer, so I'm wondering if this only works on windows. The browser has to do some funny stuff to process the page and convert it into a post (it looks for special hidden form elements and converts links to the localhost webserver run by picasa into image data). But on the other hand the following page says that the upload button is supported on a mac: http://picasa.google.com/support/bin/an ... swer=45155. So I'm not sure what is going wrong. Sorry I don't have an answer for you.

greg
Post Reply