From b53cddbf6ae1eb70170dd8a31e3cba879929797e Mon Sep 17 00:00:00 2001 From: plegall Date: Sun, 5 Oct 2008 21:22:57 +0000 Subject: 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 --- tools/piwigo_remote.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tools/piwigo_remote.pl') 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}; } -- cgit v1.2.3