Help for this page
# Limit file sizes to 1 MB use constant MAX_FILE_SIZE => 1_048_576; $CGI::POST_MAX = MAX_FILE_SIZE;
# 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 +);