GUP 0.2.3 "Not My Fault"

Since last Gallery release (2.2.1), GUP stopped working, returning a 500 (Server Error) after each request. Today I found that the Remote Plugin was upgraded to version 1.0.9 and, finally, GUP is working again. Also, the documentation (but unavailable till now) authToken parameter (which should be returned on every request to avoid cross site attacks) is finally being returned and, thus, I made a new release to use the command (although it seems it wasn’t being check anyway).

So, for this new version to work, you need to go to “Plugins” in the site admin interface, “Get More Plugins”, “Update Plugin list” and, when it completes, upgrade the “Remote” plugin (which should be under the “Remote Interfaces” group.

I would like to thank “Domingo Aguilera” for pointing that GUP was not using the authToken.

This entry was posted in Code, GUP. Bookmark the permalink.

7 Responses to GUP 0.2.3 "Not My Fault"

  1. eric says:

    Hi! I’d like to use your tool in some shell scripts. (Like accepting files via Bluetooth and automatically upload them to a gallery)
    I’m missing some kind of a man page for it and I don’t really understand python source code.
    Could you write up a list of command line parameters and examples.
    Also I’m not sure about the format of e.g. the album id (number or album name/url).
    thanks for your work on gup!
    eric.

  2. Pingback: //epe/at/blog/ » Fotoblogging from mobilephone via Bluetooth to Gallery2

  3. kito says:

    Hey,

    I’m trying to use your script, which is a great idea btw, to upload some photos but for some reason it’s always failing. The jpegs are being truncated at 59 bytes when they’re uploaded. The verbose output, which I can send if you want, indicates that the file was uploaded successfully. I can create albums and see listings, so I’m not sure why the file upload fails. Just thought you could give some idea as to where I should start looking for the problem.

    Thanks,
    Kito

  4. Julio Biason says:

    @kito: Sorry, it is the first time I see something like that. Have you tried to upgrade your Gallery + Remote installation?

  5. Irwan says:

    GUP doesn’t set caption to the base file name (without extension) by default. Can you change gallery.py to set caption as follows?

    def add_item(self, album, filename):
    ”’Add an item to an album”’
    (status, _) = self.request(‘add-item’, ’2.0′, {
    ‘g2_form[set_albumName]‘: album,
    ‘g2_userfile_name’: filename,
    ‘g2_form[caption]‘: os.path.basename(os.path.splitext(filename)[0])
    },
    (‘g2_userfile’, filename)
    )

    if status is None:
    raise ConnectionError

    if not status == 0:
    raise self._return_codes[status]

    The addition there is the line:
    ‘g2_form[caption]‘: os.path.basename(os.path.splitext(filename)[0])

    Thanks!

  6. Julio Biason says:

    I was planing using the “caption” field reading information in the EXIF file.

    IIRC, there is a way to set the description too. To do that, my plan was to use a file with files to be uploaded, their caption and description.

    I don’t like the idea of using the filename as caption. Most of my files are named using timestamps (using jhead -nf%Y%m%d-%H%M%S *), which makes easier to upload pictures in correct order, but it is completely meaningless otherwise.

  7. Julio Biason says:

    Also, when I just upload one single picture, it’s just named “IMG0000?.JPG”. Again, completely meaningless.