- or download this
my $outputFile;
if( $_file_name !~ /^(\s*)$/ ) {
- or download this
use constant BUFFER_SIZE => 16_384; # Amount of upload file t
+o read at
one time
use constant MAX_FILE_SIZE => 3_145_728; # This is the filesize up
+load limit
- or download this
$CGI::DISABLE_UPLOADS = 0; # Temporarily reenable up
+loads
$CGI::POST_MAX = MAX_FILE_SIZE;
- or download this
# Path and Filename
my $file_name = $_file_name;
- or download this
my $file_type = $query->uploadInfo($file_name)->{'Content-Type'};
+
my $basename = basename($file_name);
- or download this
if( $file_type =~ /octet-stream/ ) {
...
format."];
goto Print;
}
- or download this
$outputFile = $UPLOAD_RESUME_DIRECTORY . $basename ;
my $buffer = "";
open(OUTPUT,">>$outputFile");
- or download this
my @stats;
...
}
}
close(OUTPUT);
- or download this
#check the file size
if ( $stats[7] > MAX_FILE_SIZE || %errors ) {
...
;
unlink $outputFile;