mass-upload to picasaweb from Linux

Picasaweb is a Google’s service for publishing web photo albums. The mainA drawback of this service is that under Linux you have to upload each image manually. The evil empire (not microsoft) knows about the problem, but has’t released even a temporary solution. Fortunately, I managed to find a workaround:

Start a browser, login to picasaweb. Create the album “incoming”. Go to the photo upload page. View the page source (or use Web Developer plugin to get form details). Follow the data in the HTML code to create picasa.sh. Here is the skeleton:


curl \
-b /home/olpa/.mozilla/..../cookies.txt \
-F redir='http://picasaweb.google.com/..../Incoming?authkey=....' \
-F uname=.... \
-F aid=.... \
-F num='1' \
-F name='' \
-F file0=@$1 \
'http://picasaweb.google.com/lh/addPhotos?tok=....'

Option “-b” is the path to your Firefox cookies file. The value of the form field “file0” is read from a file. The value “num” shouldn’t be empty, but set to “1“.

Usage:

$ picasa.sh my_photo.jpg

If everything is ok, you’ll get as the response “Moved Temporarily”.

To upload all the files in a directory:

$ for i in *jpg; do picasa.sh $i; done

evil_empire++

I’ve realized that there is no such feature as password protection of albums. Picasaweb disqualified, I’m going to search for another web album service.

7 Responses to “mass-upload to picasaweb from Linux”

  1. Egor Says:

    http://picasa.google.com/linux/download.html

    > I’ve realized that there is no such feature as password protection of albums

    why? cookies are protected with passwd, aren’t they?

  2. Vijay Says:

    Thanks a lot! it did work!!! I was scouting a lot to fix this and this seems a simple solution.

  3. Jarrod Says:

    Hey, thanks for the script! Only problem I’m having is tracking down the authkey value — the url on the form redirect doesn’t have this authkey value-pair

  4. Erik Says:

    Same prob as above. Where can I find the ‘authkey’? Its not in the source.

    Thanks for the help!

    Erik

  5. olpa Says:

    Probably you are looking for “authkey” as a separate variable? I took it for the part of URLs, for example:

    < input type="hidden" name="redir" value="http://picasaweb.google.com/olepar/Incoming?authkey=MrF0Hx9tYGq" / >

    Authkey is “MrF0Hx9tYGq”.

  6. thejart Says:

    it seems like this doesn’t work anymore. to grab all of the necessary information i had to toggle the unlisted/public properties of the folder to grab the authkey from my home page. between that and the download page i figured out all of the required info, but i keep getting ‘Unable to process request.’ could someone verify that this still works?

  7. nixpanic Says:

    F-Spot can do uploads to picasaweb. It’s a native GNOME application for managing photos.

Leave a Reply