aboutsummaryrefslogtreecommitdiffstats
path: root/tools/piwigo_remote.pl
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2008-10-05 21:22:57 +0000
committerplegall <plg@piwigo.org>2008-10-05 21:22:57 +0000
commitb53cddbf6ae1eb70170dd8a31e3cba879929797e (patch)
tree2ccc44d984766b06f849edbaf79666ca9b4afe99 /tools/piwigo_remote.pl
parent0bdc6a5dac8ee12cf630b42e4a8d6a0be4116ae2 (diff)
feature 885 added: pwg.images.add web API method now supports additional
high resolution format. git-svn-id: http://piwigo.org/svn/trunk@2670 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'tools/piwigo_remote.pl')
-rw-r--r--tools/piwigo_remote.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/piwigo_remote.pl b/tools/piwigo_remote.pl
index 776802589..f11e0d457 100644
--- a/tools/piwigo_remote.pl
+++ b/tools/piwigo_remote.pl
@@ -6,11 +6,12 @@ use warnings;
use JSON;
use LWP::UserAgent;
use Getopt::Long;
+use Encode qw/is_utf8 decode/;
my %opt = ();
GetOptions(
\%opt,
- qw/action=s file=s thumbnail=s categories=s define=s%/
+ qw/action=s file=s thumbnail=s high=s categories=s define=s%/
);
our $ua = LWP::UserAgent->new;
@@ -62,6 +63,11 @@ if ($opt{action} eq 'pwg.images.add') {
categories => $opt{categories},
};
+ if (defined $opt{high}) {
+ $form->{high_content} = encode_base64(read_file($opt{high}));
+ $form->{high_sum} = file_md5_hex($opt{high});
+ }
+
foreach my $key (keys %{ $opt{define} }) {
$form->{$key} = $opt{define}{$key};
}