+ #ShopImage
+ if($file->object_type eq "shop_image"){
+ my $image_content = $params{file_contents};
+ my $thumbnail = file_probe_type($image_content);
+ my $shopimage = SL::DB::ShopImage->new();
+ $shopimage->assign_attributes(
+ file_id => $file->id,
+ thumbnail_content => $thumbnail->{thumbnail_img_content},
+ org_file_height => $thumbnail->{file_image_height},
+ org_file_width => $thumbnail->{file_image_width},
+ thumbnail_content_type => $thumbnail->{thumbnail_img_content_type},
+ object_id => $file->object_id,
+ );
+ $shopimage->save;
+ }