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.
October 16th, 2007 at 1:54 pm
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?
October 17th, 2007 at 11:47 am
Thanks a lot! it did work!!! I was scouting a lot to fix this and this seems a simple solution.
November 7th, 2007 at 7:17 pm
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
February 11th, 2008 at 11:16 am
Same prob as above. Where can I find the ‘authkey’? Its not in the source.
Thanks for the help!
Erik
February 12th, 2008 at 6:50 am
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”.
March 21st, 2008 at 12:38 am
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?
November 21st, 2008 at 5:30 pm
F-Spot can do uploads to picasaweb. It’s a native GNOME application for managing photos.