Hi all,
I've made a script for uploading files.
I want to verify the CONTENT_LENGTH. I know how to do it and it works.
The problem is that for verifying the CONTENT_LENGTH, the page visitor
should wait a long time if the file is bigger, like the time for uploading
the file.
The visitor may not like to hear that the file is too big after they wait a
lot to upload it.
The main code I use for this is:
$file = $q -> param ('file'};
$dir_max_size = "...";
$buffer = $ENV{CONTENT_LENGTH};
if ((dir_size + $buffer) > $dir_max_size) {
....
}
dir_size is a function that gets the size of all files from the output
folder.
Do I have a faster option for telling the visitor if a file is too big?
I have also tried to use:
$buffer = -s $file;
This is more precise, but it works very slow also.
Note: I've tried using the functions for uploading from CGI module, but with
no good results in Windows 2000, and that's why I want to write my code.
Thank you for any idea.
Teddy,
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]