Add a comment, to detail if the Asset is overwritten or added
This commit is contained in:
parent
bfe19ab773
commit
63b1c2edcc
1 changed files with 2 additions and 0 deletions
|
|
@ -218,10 +218,12 @@ sub addFiles {
|
|||
# TB : If the Asset exists, just copy the file.
|
||||
# To be check.
|
||||
my $storage = WebGUI::Storage->get($replaceAssetId);
|
||||
print "\t\tAsset exists already. Replace the file.\n" unless ($quiet);
|
||||
my $filename = $storage->addFileFromFilesystem("$pathToFiles$slash$file->{relpath}$slash$file->{filename}");
|
||||
$child->generateThumbnail if ($class eq 'WebGUI::Asset::File::Image');
|
||||
$child->setSize($storage->getFileSize($filename));
|
||||
} else {
|
||||
print "\t\tCreate the new asset.\n" unless ($quiet);
|
||||
my $storage = WebGUI::Storage->create;
|
||||
my $filename = $storage->addFileFromFilesystem("$pathToFiles$slash$file->{relpath}$slash$file->{filename}");
|
||||
# TB : possibly remove the extension if the ignoreExtInName feature enabled.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue