Help for this page

Select Code to Download


  1. or download this
    my $outputFile;
    if( $_file_name !~ /^(\s*)$/ ) {
    
  2. 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
    
  3. or download this
        $CGI::DISABLE_UPLOADS      = 0;          # Temporarily reenable up
    +loads
        $CGI::POST_MAX             = MAX_FILE_SIZE;
    
  4. or download this
        # Path and Filename
        my $file_name = $_file_name;
    
  5. or download this
        my $file_type = $query->uploadInfo($file_name)->{'Content-Type'}; 
    + 
    
        my $basename = basename($file_name);
    
  6. or download this
    
        if( $file_type =~ /octet-stream/ ) {
    ...
    format."];
            goto Print;
        }
    
  7. or download this
        $outputFile = $UPLOAD_RESUME_DIRECTORY . $basename ;
        my $buffer = "";   
        open(OUTPUT,">>$outputFile");
    
  8. or download this
     
        my @stats;
    
    ...
            }
        }
        close(OUTPUT);
    
  9. or download this
        #check the file size
        if ( $stats[7] > MAX_FILE_SIZE || %errors ) {
    ...
    ;
            unlink $outputFile;