--- Timothy Kimball <[EMAIL PROTECTED]> wrote:
>
> Teresa Raymond wrote:
> : How do I access the file size without making filesize a parameter
> : input by the user?
>
> This should be in the $ENV{CONTENT_LENGTH} variable.
>
> -- tdk
That will only give the approximate filesize. $ENV{CONTENT_LENGTH} is the total size
of the
entity body. With 'multipart/form-data' (the enctype used with file uploading), the
entity bodies
size is even larger than normal. The more data sent (besides the file), the larger
$ENV{CONTENT_LENGTH} will be.
Unless I am mistaken, CGI.pm does not track filesize data directly. If the POST size
(not file
size) is larger than what CGI.pm is allowed, then $query->cgi_error will contain the
text "413
Request entity too large".
Cheers,
Curtis Poe
=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/
__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/