June 12th, 2000, 09:59 AM
I have some script that uploads files to my server.
Is there any way to limit file size to be uploaded ?
I don't want my users to be able to upload files larger then 3 MB.
June 12th, 2000, 04:20 PM
If your script doesn't check for file size, you should then get another one. Please go to: http://www.scriptsearch.com/
There are plenty of upload scripts that can limit the upload size.
June 13th, 2000, 03:35 AM
If it's using the CGI perl module.
If set to a non-negative integer, this variable puts a
ceiling on the size of POSTings, in bytes. If CGI.pm
detects a POST that is greater than the ceiling, it
will immediately exit with an error message. This
value will affect both ordinary POSTs and multipart
POSTs, meaning that it limits the maximum size of file
uploads as well. You should set this to a reasonably
high value, such as 1 megabyte.