#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    71
    Rep Power
    15
    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.
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    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.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 1999
    Posts
    33
    Rep Power
    16
    If it's using the CGI perl module.

    $CGI::POST_MAX
    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.

IMN logo majestic logo threadwatch logo seochat tools logo