- Timestamp:
- May 26, 2012, 12:05:24 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/piwigo_remote.pl
r4348 r15327 4 4 # Usage examples 5 5 # 6 # time perl piwigo_remote.pl \ 7 # --action=pwg.images.add \ 8 # --file=erwann_rocher-web.jpg \ 9 # --thumb=erwann_rocher-thumb.jpg \ 10 # --high=erwann_rocher-high.jpg \ 11 # --original=erwann_rocher-high.jpg \ 12 # --define categories=9 \ 13 # --chunk_size=200_000 6 # perl piwigo_remote.pl --action=pwg.images.add --file=erwann_rocher-web.jpg --define categories=9 14 7 15 8 use strict; … … 29 22 action=s 30 23 file=s 31 thumbnail=s32 high=s33 24 original=s 34 25 categories=s … … 89 80 $form->{method} = $opt{action}; 90 81 91 my $original_sum = file_md5_hex($opt{original}); 82 my $original = $opt{file}; 83 if (defined $opt{original}) { 84 $original = $opt{original}; 85 } 86 87 my $original_sum = file_md5_hex($original); 92 88 $form->{original_sum} = $original_sum; 93 89 … … 98 94 ); 99 95 $form->{file_sum} = file_md5_hex($opt{file}); 100 101 send_chunks(102 filepath => $opt{thumbnail},103 type => 'thumb',104 original_sum => $original_sum,105 );106 $form->{thumbnail_sum} = file_md5_hex($opt{thumbnail});107 108 if (defined $opt{high}) {109 send_chunks(110 filepath => $opt{high},111 type => 'high',112 original_sum => $original_sum,113 );114 $form->{high_sum} = file_md5_hex($opt{high});115 }116 96 117 97 foreach my $key (keys %{ $opt{define} }) {
Note: See TracChangeset
for help on using the changeset viewer.