Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- limiting upload file size
September 3, 2005, 10:07 am
rate this thread
check file size before upload begins via a POST method. Browser side
checking can be fooled.
I also figured that file size is checked only after the upload
This can be dangerous since a large file upload can take server disk
(atleast for a while - until the php script detects it and deletes the
The server *MUST* stop receiving a file immediately, if file size grows
beyond a specified size.
How is this achieved ?
Re: limiting upload file size
there is a php-setting called "upload_max_filesize". you can set it via
editing php.ini or the ini_set()-function in your script.
it is also possible to use the browser to control max-uploaded size:
<input type="hidden" name="MAX_FILE_SIZE" value="30000">
please read php.net: http://www.php.net/manual/en/features.file-upload.php