galleryadd.pl gets error 500

martinolich

Joined: 2007-01-13
Posts: 18
Posted: Wed, 2007-02-07 20:51

Hi,

When I try using galleryadd.pl to upload an image (or create a new album) I get a http error 500. Verbose mode doesnt give any more information. I can list directories fine.

When I do a -T I get
DBG: ERR Head=[0xffd8][ ]
Tail=[0xffd9][ ]
Not sure if thats an error?

I am running Gallery2 2.2RC1 on a Win2003/IIS server with perl 5.8.8

Jim

 
shufei

Joined: 2005-09-28
Posts: 8
Posted: Tue, 2007-02-20 19:42

The script galleryadd needs to be updated to start passing the auth_token. Auth_token is a new security measure introduced in 2.2.

I'm in the middle of changing the script, but there appears to be a bug in the 2.2 RC1 remote protocol. Login does not provide an auth_token in the response.

Stay tuned.

 
shufei

Joined: 2005-09-28
Posts: 8
Posted: Wed, 2007-02-21 04:03

Completed changes. I had to do a "no-op" after the login to get the auth_token.

I have also added a check for server version before attempting to get the auth_token so that the script continues to work with earlier versions.

Try the attached script.

 
martinolich

Joined: 2007-01-13
Posts: 18
Posted: Wed, 2007-02-21 06:54

Yeah it worked! Thanks.

Are there any applications that let you upload data fields (especially in may case custom data fields) for these uploaded pictures? Can it be done using the galleryremote API?

Thanks again,
Jim

 
shufei

Joined: 2005-09-28
Posts: 8
Posted: Wed, 2007-02-21 21:26
martinolich wrote:
Yeah it worked! Thanks.

Are there any applications that let you upload data fields (especially in may case custom data fields) for these uploaded pictures? Can it be done using the galleryremote API?

Thanks again,
Jim

I'm not familiar with custom data fields. Please give me an example.

 
martinolich

Joined: 2007-01-13
Posts: 18
Posted: Thu, 2007-02-22 17:16

Custom fields are created using the Customer Fields plug-in
http://codex.gallery2.org/Gallery2:Modules:customfield
The fields are editable from the 'Custom Fields' tab that appears on the 'Edit Photo' page.
I was wondering if its possible to edit them remotely when uploading the images?

By the way, I saw that it is possible to edit the caption using galleryadd.pl's -C option.

Thanks again,
Jim

 
martinolich

Joined: 2007-01-13
Posts: 18
Posted: Thu, 2007-03-15 01:31

the new galleryadd.pl has been working fine on my win2003/iis/ms-sql system. I hacked it a bit so that I can upload summary and description using...
'g2_form[extrafield.Summary]' => $gallery_summary,
'g2_form[extrafield.Description]' => $gallery_description,

Is there any way to upload keywords as well using a similar command?

Jim

 
fweeee

Joined: 2006-12-16
Posts: 46
Posted: Sat, 2007-06-02 02:15

martinolich,

I'm also trying to upload keywords via API (I've just started other threads on this). Have you had any luck?

 
martinolich

Joined: 2007-01-13
Posts: 18
Posted: Mon, 2007-06-04 02:02

fweeee, no I never was able to do it, and just worked around it

 
taz5612

Joined: 2007-06-25
Posts: 1
Posted: Mon, 2007-06-25 02:20

I'm running gallery 2.2.1 on LAMP, and am having the same problem when running galleryadd.pl 2.3. Does anyone else have the same problem, or am I just missing something?

Thanks,
taz

 
james147

Joined: 2009-01-20
Posts: 5
Posted: Sat, 2009-01-24 20:16

bump* 2.2.5 here same issue DBG: ERR Head=[0xffd8][ ] Tail=[0xffd9][ ]. Even tried bypassing the integrity check in the script, with no luck. Gave me lots of errors, basically the upload failed.
#__GR2PROTO__
status=403
status_text=Upload failed\: ''.
status_debug=1
debug_user=admin
debug_time=0.001s
auth_token=d3cb3ec2af05