note 102213 added to features.file-upload.post-method
| From: | zingaburga at hotmail dot com | Date: | Thu, 03 Feb 2011 03:09:43 +0000 |
| Subject: | note 102213 added to features.file-upload.post-method | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-176608@lists.php.net to get a copy of this message | ||
The documentation is a little unclear about the MAX_FILE_SIZE value sent in the form with multiple
file input fields. The following is what I have found through testing - hopefully it may clarify it
for others.
The MAX_FILE_SIZE is applied to each file (not the total size of all files) and to all file inputs
which appear after it. This means that it can be overridden for different file fields. You can
also disable it by sending no number, or sending 0 (probably anything that == '0' if you
think about it).
Example:
<form enctype="multipart/form-data" action="." method="POST">
<!-- no maximum size for userfile0 -->
<input name="userfile0" type="file" />
<input type="hidden" name="MAX_FILE_SIZE" value="1000" />
<!-- maximum size for userfile1 is 1000 bytes -->
<input name="userfile1" type="file" />
<!-- maximum size for userfile2 is 1000 bytes -->
<input name="userfile2" type="file" />
<input type="hidden" name="MAX_FILE_SIZE" value="2000" />
<!-- maximum size for userfile3 is 2000 bytes -->
<input name="userfile3" type="file" />
<input type="hidden" name="MAX_FILE_SIZE" value="0" />
<!-- no maximum size for userfile4 -->
<input name="userfile4" type="file" />
</form>
----
Server IP: 69.147.83.197
Probable Submitter: 209.124.33.201
----
Manual Page -- http://www.php.net/manual/en/features.file-upload.post-method.php
Edit -- https://master.php.net/note/edit/102213
Del: integrated -- https://master.php.net/note/delete/102213/integrated
Del: useless -- https://master.php.net/note/delete/102213/useless
Del: bad code -- https://master.php.net/note/delete/102213/bad+code
Del: spam -- https://master.php.net/note/delete/102213/spam
Del: non-english -- https://master.php.net/note/delete/102213/non-english
Del: in docs -- https://master.php.net/note/delete/102213/in+docs
Del: other reasons-- https://master.php.net/note/delete/102213
Reject -- https://master.php.net/note/reject/102213
Search -- https://master.php.net/manage/user-notes.php