use CGI 2.47 qw/:standard/; $CGI::POST_MAX = 1024 * 100; # max 100 kbytes posts $CGI::DISABLE_UPLOADS = 0; # Allow uploads. print $query->filefield( -name => 'uploaded_file', -size => 50, -maxlength => $CGI::POST_MAX, -accept => 'text/*', );