Looking for sample perl code to add image with Custom Fields in G2

fweeee

Joined: 2006-12-16
Posts: 46
Posted: Fri, 2007-06-01 21:27

I'm looking for sample of perl code using the extrafield functionality built into the add-item API.

The document implies I can do it, as laid out here:
cmd=add-item
protocol_version=2.0
set_albumName=album name
userfile=user-file
userfile_name=file-name
caption=caption [optional]
force_filename=force-filename [optional]
auto_rotate=yes/no [optional, since 2.5]
extrafield.fieldname=fieldvalue [optional, since 2.3]

I have found a sample, at http://gallery.menalto.com/node/32113 , but that sample is for G1, and I havnt been able to get it working for G2.

Thanks.

 
fweeee

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

I've managed to work it out. The code is:
'g2_form[extrafield.fieldname]' => 'Text goes here',

The problem I was having is that I was trying it for "Keywords", which doesnt seem to work. This code works fine for other fields, such as Description and Summary.

Does anyone know if this works for Keywords, and I'm just using the wrong word?