note 102213 deleted from features.file-upload.post-method by cmb

From: Date: Sat, 11 Jun 2016 11:26:12 +0000
Subject: note 102213 deleted from features.file-upload.post-method by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-205687@lists.php.net to get a copy of this message
Note Submitter: zingaburga at hotmail dot com ---- 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>

« previous php.notes (#205687) next »