in reply to Re: Upload file through perl-cgi not working
in thread Upload file through perl-cgi not working
my $outfile = "$upload_dir".""; my ($safe_file_name) = $outfile =~ /([-\@:\/\\\w.]+)$/; if ($file =~ /swf/ || $file =~ /high/ || $file =~ /low/) { $outfile .= $file; $safe_file_name = $1; $file = $1; #if (-e $outfile) { # error_msg("File already exist in destination folder"); #} } else { error_msg("Only '.swf' files and files with 'high' or 'low' in +the name will be uploaded."); } if (!$safe_file_name) { die qq{Disallowed characters in file $safe_file_name\n}; }
|
|---|