note 40859 deleted from features.file-upload by nlopess
| From: | nlopess@php.net | Date: | Sat, 03 Apr 2004 15:18:01 +0000 |
| Subject: | note 40859 deleted from features.file-upload by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-67572@lists.php.net to get a copy of this message | ||
Note Submitter: n dot dose @ hicom dot de
----
MAX_FILE_SIZE:
check the error of the upload to see if MAX_FILE_SIZE was exceeded, for example:
$_FILES['userfile']['error']
has a value of 2 (UPLOAD_ERR_FORM_SIZE) when the file size exceeds MAX_FILE_SIZE.
This error gets set automatically by PHP. Your script does not need to compare the sizes.
The user *will* have to wait for the entire payload to be transferred to your server, however.
This is a PHP-only feature. It has nothing to do with the client's browser. The RFC hints at a
MAXLENGTH property for the <input type="file">, but this is not supported by
browsers (I tested on IE 6 and Netscape 7 on Windows 2000)