> Hi,
>
> I have this problem, on my web I´m using file upload from the web page
> something like this:
>
> <FORM METHOD="POST" ENCTYPE="multipart/form-data">
> <INPUT TYPE="FILE" NAME="ImageName">
> <INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Upload file">
> </FORM>
> ......
> [-
> open FILE, "> /tmp/file.$$";
> print FILE $buffer while read($fdat{ImageName}, $buffer, 32768);
> close FILE;
> -]
one way is to use smaller chunks and to use code like this
while ($count=read($fdat{ImageName}, $buffer, 32768))
{
if ($total+$count>$max_allowed)
{
remove files, close handles, crash;
}
$total+=$count;
print FILE $buffer;
}
another way is to use CGI MAX_UPLOAD capabilities.
Neeme Vool
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]