Show
Ignore:
Timestamp:
09/22/08 23:47:03 (5 years ago)
Author:
plg
Message:

improvement: WebService method pwg.images.add can set fill #images table
columns. rank is directly related to a category and several categories can
be linked at once. Basic technical metadata {filesize, width, height} are
automaticaly filled.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tools/piwigo_remote.pl

    r2553 r2569  
    1111GetOptions( 
    1212    \%opt, 
    13     qw/action=s file=s thumbnail=s category_id=i name=s rank=s/ 
     13    qw/action=s file=s thumbnail=s categories=s define=s%/ 
    1414); 
    1515 
     
    6060        thumbnail_sum => $thumbnail_sum, 
    6161        thumbnail_content => $thumbnail_content, 
    62         category_id => $opt{category_id}, 
    63         name => $opt{name}, 
    64         rank => defined($opt{rank}) ? $opt{rank} : 'auto', 
     62        categories => $opt{categories}, 
    6563    }; 
     64 
     65    foreach my $key (keys %{ $opt{define} }) { 
     66        $form->{$key} = $opt{define}{$key}; 
     67    } 
    6668 
    6769    my $response = $ua->post(