fix - Storage::Image copy does not create thumbnails
This commit is contained in:
parent
5dddf92543
commit
f749d2d260
3 changed files with 27 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
|||
- fix: Show Debugging option not working
|
||||
- fix: Workflow form control edit button won't work. removed.
|
||||
- fix: Bug in HttpProxy.pm
|
||||
- fix: Storage::Image copy does not create thumbnails
|
||||
|
||||
7.2.1
|
||||
- Made a change to version tag commits to deal with unusually long commit
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ sub addFileFromScalar {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 copy ( [ storage ] )
|
||||
=head2 copy ( [ storage, filelist ] )
|
||||
|
||||
Copies a storage location and it's contents. Returns a new storage location object. Note that this does not copy privileges or other special filesystem properties.
|
||||
|
||||
|
|
@ -298,12 +298,16 @@ Copies a storage location and it's contents. Returns a new storage location obje
|
|||
|
||||
Optionally pass in a storage object to copy the data to.
|
||||
|
||||
=head3 filelist
|
||||
|
||||
Optionally pass in the list of filenames to copy from the specified storage location
|
||||
|
||||
=cut
|
||||
|
||||
sub copy {
|
||||
my $self = shift;
|
||||
my $newStorage = shift || WebGUI::Storage->create($self->session);
|
||||
my $filelist = $self->getFiles(1);
|
||||
my $filelist = shift || $self->getFiles(1);
|
||||
foreach my $file (@{$filelist}) {
|
||||
my $source = FileHandle->new($self->getPath($file),"r");
|
||||
if (defined $source) {
|
||||
|
|
|
|||
|
|
@ -74,6 +74,26 @@ sub addFileFromCaptcha {
|
|||
return ($filename, $challenge);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 copy ( [ storage ] )
|
||||
|
||||
Overriding the copy method so that thumbnail files are copied along with other image files
|
||||
|
||||
=head3 storage
|
||||
|
||||
Optionally pass a storage object to copy the files to.
|
||||
|
||||
=cut
|
||||
|
||||
sub copy {
|
||||
my $self = shift;
|
||||
my $newStorage = shift;
|
||||
# Storage::Image->getFiles excludes thumbnails from the filelist and we want to copy the thumbnails
|
||||
my $filelist = $self->SUPER::getFiles(1);
|
||||
|
||||
return $self->SUPER::copy($newStorage, $filelist);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue