Changeset 2696 for extras/pLoader/trunk/src/Uploader/PWG
- Timestamp:
- Oct 9, 2008, 10:58:41 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extras/pLoader/trunk/src/Uploader/PWG/WebServices.pm
r2661 r2696 25 25 use JSON; 26 26 use LWP::UserAgent; 27 use Text::ASCIITable;28 27 use Data::Dumper; 29 28 use Digest::MD5::File qw/file_md5_hex md5_hex/; 30 29 use File::Slurp; 31 30 use Encode qw/encode decode/; 32 #use String::Random qw/random_string/;33 31 use base qw/ 34 32 Uploader::Object … … 47 45 tags 48 46 categories 49 imagefile 50 thumbfile 51 imagename 47 site_high_file 48 site_resized_file 49 site_thumb_file 50 site_image_name 52 51 rank 53 author54 comment55 date_creation52 site_author 53 site_comment 54 site_img_date_creation 56 55 uagent_response 57 56 login_result 58 57 action_result 58 upload_high 59 59 / 60 60 ); … … 162 162 printf( 163 163 "UploadImage %s\n", 164 $self->imagefile 165 ); 164 $self->site_resized_file 165 ); 166 166 167 my $file_content = encode_base64( 167 168 read_file( 168 $self-> imagefile,169 $self->site_resized_file, 169 170 binmode => ':raw', 170 171 ) … … 172 173 173 174 my $file_sum = file_md5_hex( 174 $self-> imagefile175 $self->site_resized_file 175 176 ); 176 177 177 178 my $thumbnail_content = encode_base64( 178 179 read_file( 179 $self-> thumbfile,180 $self->site_thumb_file, 180 181 binmode => ':raw', 181 182 ) … … 183 184 184 185 my $thumbnail_sum = file_md5_hex( 185 $self->thumbfile 186 ); 186 $self->site_thumb_file, 187 ); 188 187 189 188 190 … … 194 196 thumbnail_content => $thumbnail_content, 195 197 categories => $self->categories, 196 name => $self-> imagename,198 name => $self->site_image_name, 197 199 rank => $self->rank, 198 author => $self-> author,199 comment => $self-> comment,200 date_creation => $self-> date_creation,200 author => $self->site_author, 201 comment => $self->site_comment, 202 date_creation => $self->site_img_date_creation, 201 203 202 204 }; 205 206 if($self->upload_high){ 207 $form->{high_content} = encode_base_64( 208 read_file( 209 $self->site_high_file, 210 binmode => ':raw', 211 ) 212 ); 213 $form->{high_sum} = file_md5_hex( 214 $self->site_high_file 215 ); 216 } 217 203 218 204 219 my $result = $self->uagent->post(
Note: See TracChangeset
for help on using the changeset viewer.