Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Thoughts on file upload...

by mikeirw (Pilgrim)
on Nov 20, 2002 at 15:20 UTC ( [id://214478]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # Limit file sizes to 1 MB
    use constant MAX_FILE_SIZE => 1_048_576;
    $CGI::POST_MAX = MAX_FILE_SIZE;
    
  2. or download this
    # 100 MB limit on the size of the upload dir
    use constant MAX_DIR_SIZE => 100 * 1_048_576;
    ...
    
    die 'Upload directory is full.'
      if ( dir_size('/path/to/dir') + $ENV{CONTENT_LENGTH} > MAX_DIR_SIZE 
    +);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://214478]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2024-04-18 18:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found