Skip to content

Commit

Permalink
Item15225: fixed change properties of attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Nov 17, 2023
1 parent d16e669 commit d8d25f2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/lib/Foswiki/UI/Upload.pm
Expand Up @@ -124,17 +124,19 @@ sub _upload {
my $fileComment = $query->param('filecomment') || '';
my $createLink = $query->param('createlink') || '';
my $doPropsOnly = $query->param('changeproperties');
my $fileName = $query->param('filename') || '';

$fileComment =~ s/\s+/ /g;
$fileComment =~ s/^\s*//;
$fileComment =~ s/\s*$//;

my @fileNames = ();
foreach my $filePath ( $query->multi_param("filepath") ) {
next unless $filePath;

$filePath =~ m|([^/\\]*$)|;
my $fileName = $1;
if ($filePath) {
$filePath =~ m|([^/\\]*$)|;
$fileName = $1;
}
$fileName =~ s/\s*$//;
$filePath =~ s/\s*$//;

Expand Down

0 comments on commit d8d25f2

Please sign in to comment.