Philip Mak wrote:
> 
> I have this in httpd.conf:
> 
>         PerlSetVar FileUploadMax 1048576
>         PerlSetVar FileUploadTemp 1
> 
> I wrote this code to test file uploading:
> 
>         my $file = $Request->{FileUpload}{sjis};
>         use Data::Dumper;
>         print "<pre>".Dumper($file)."</pre>";
> 
> When I upload a file that's too big, it prints this:
> 
>         $VAR1 = undef;
> 

Sorry Philip for taking so long to get back to you, I've
been on vacation & just got back...

I believe something like this will work:

if($Request->{TotalBytes} > $Server->Config('FileUploadMax')) {
  ... too big ...
} else {
  ... upload file OK if defined ...
}

if you embed a hidden field on the file upload form, it may
be also that that parameter is defined while the upload itself
is not when the user processes the form, but I have not tried
this & do not know the results.

--Josh
_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to