Changeset 5020 for extensions/pLoader/trunk/src
- Timestamp:
- Mar 2, 2010, 10:55:56 AM (15 years ago)
- Location:
- extensions/pLoader/trunk/src/Uploader
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pLoader/trunk/src/Uploader/Image.pm
r4779 r5020 32 32 site_author 33 33 site_comment 34 site_original_filename 34 35 exif_metadata 35 36 add_rank -
extensions/pLoader/trunk/src/Uploader/ImageList.pm
r4803 r5020 1204 1204 $self->current_image->file 1205 1205 ); 1206 1206 1207 $self->current_image->site_original_filename( 1208 $file 1209 ); 1207 1210 my ( $filename, $ext ) = split /\./, $file ; 1208 1211 … … 1220 1223 } 1221 1224 1225 1226 1222 1227 sub CreateWatermark { 1223 1228 my ( $self, $text, $text_size, $position, $x, $y, $color, $file_out ) = @_; … … 1264 1269 # set default values only if not defined 1265 1270 # || operator is not used because 0 is a choice value 1266 # and wou kd replace a valid choice with a default value1271 # and would replace a valid choice with a default value 1267 1272 $self->reupload_action_files(1) 1268 1273 unless defined $self->reupload_action_files; … … 1292 1297 $self->current_image->site_high_file 1293 1298 ); 1299 1300 $self->pwg->site_original_filename( 1301 $self->current_image->site_original_filename 1302 ); 1303 1294 1304 1295 1305 $self->pwg->site_resized_file( -
extensions/pLoader/trunk/src/Uploader/PWG/WebServices.pm
r4779 r5020 47 47 tags 48 48 categories 49 site_original_filename 49 50 site_high_file 50 51 site_resized_file … … 227 228 ); 228 229 }; 229 230 230 if($@){ 231 231 printf("An error occured in post execution %s\n%s", … … 294 294 my $rval = $self->_send_chunks($_, $progress); 295 295 $status_line = $rval->{message}; 296 last UPLOAD if !$rval->{ok}; 296 if (!$rval->{ok}){ 297 $status = 0; 298 last UPLOAD ; 299 } 297 300 } @types; 298 301 … … 301 304 method => 'pwg.images.add', 302 305 original_sum => $self->sum->{original}, 306 original_filename => $self->site_original_filename, 303 307 file_sum => $self->sum->{file}, 304 308 thumbnail_sum => $self->sum->{thumb}, … … 639 643 ); 640 644 $chunk_pos += $self->chunk_size; 645 #print "pwg.images.addChunk\n"; 646 my $data = encode_base64($chunk); 647 #printf("chunk : %s, data %s\n", length $chunk, length $data); 641 648 my $response = $self->uagent->post( 642 649 $self->urlbase.'/ws.php?format=json', 643 650 { 644 651 method => 'pwg.images.addChunk', 645 data => encode_base64($chunk),652 data => $data, 646 653 original_sum => $params->{original_sum}, 647 654 position => $chunk_id, … … 649 656 } 650 657 ); 658 #print Dumper $response; 651 659 $yield->(); 652 660 $progress->{bar}->(100*($chunk_pos/$content_length));
Note: See TracChangeset
for help on using the changeset viewer.