Submitted by Pete on January 30, 2009 - 8:58am
Body:
This is something I wrote last summer for Ellen Moffat, a Saskatoon artist. It's a very lightweight Java component that uploads files to a Gallery 2 photo album. (I really wanted to re-use the "official" Gallery 2 Java client, but it was impossible to use without launching the UI, so it turned out to be easier just to write this little doo-dad.)
If you run it as-is, a button pops up that lets you select one file at a time to upload to my test album. It's meant to be integrated into other Java apps, though, so if you want to use it in your own project, extract the source from the jar and use GalleryExample.java and UploadObserver.java as a model of how to control and handle events from the uploader. Compiled for Java 1.5+.
Check the test album.
I originally built this for Ellen's twicescore project. With Ellen's permission, I offered this code to the Gallery folks, but I never heard back, so I'll just distribute it here. Use it as you like.