Beefy Boxes and Bandwidth Generously Provided by pair Networks httptech
There's more than one way to do things
 
PerlMonks  

Re: how to get the sizes of a file when i use CGI.PM to upload it~~?

by tachyon (Chancellor)
on Jul 30, 2001 at 13:45 UTC ( [id://100861]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to how to get the sizes of a file when i use CGI.PM to upload it~~?

You guys!!!! KISS

$size = $ENV{CONTENT_LENGTH}; $too_big = 1024*1024; die "This file is to big!" if $size > $too_big;

With CGI.pm you can set the max upload file size via the POST_MAX var ie:

CGI::POST_MAX=1024 # set max upload size to 1kB;

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://100861]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.