Ok, so I know there is no way to check client side filesize before upload without using Java or ActiveX(ie) and I don't want some bloated application. I have seen a few upload scripts out there with a progress bar written in PERL and with or without AJAX. I have tried fooling around with CONTENT_LENGTH by setting a variable to limit max upload size but it still seems as if my script is trying to read the entire post before spitting back the error about going over the size limit.
if($ENV{'CONTENT_LENGTH'} > 1024*$max_upload_size
{
&error;
}
else
{
&upload;
}
do I have to add something like this to my upload directory htaccess file to have it read post immediately? Is there a security risk?
<IfModule mod_security.c>
SetEnvIfNoCase Content-Type \
"^multipart/form-data;" "MODSEC_NOPOSTBUFFERING=Do
not buffer file uploads"
</IfModule>
Trying to figure out how they do it here:
http://www.sibsoft.net/upload_form_pro.htmlI select a 100 mb file (renamed an exe to jpg), submit the form and immediately get a filesize error. When I try the same thing I just have to wait for the post.