#48437 [Opn->Csd]: Documentation overstates MAX_FILE_SIZE hidden field
| From: | danbrown@php.net | Date: | Thu, 23 Jul 2009 04:11:09 +0000 |
| Subject: | #48437 [Opn->Csd]: Documentation overstates MAX_FILE_SIZE hidden field | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-2540@lists.php.net to get a copy of this message | ||
ID: 48437
Updated by: danbrown@php.net
Reported By: phpbugreport at strokerville dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: linux
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2009-07-23 04:10:59] svn@php.net
Automatic comment from SVN on behalf of danbrown
Revision: http://svn.php.net/viewvc/?view=revision&revision=284632
Log: Addresses Bug #48437 by rewording the documentation.
------------------------------------------------------------------------
[2009-05-31 05:14:24] phpbugreport at strokerville dot com
Description:
------------
I spend the better part of a day trying to find what I'd done wrong to
prevent the following feature from working:
"This form element should always be used as it saves users the trouble
of waiting for a big file being transferred only to find that it was too
big and the transfer failed."
http://www.php.net/manual/en/features.file-upload.post-method.php
From what I found searching online, including this previous bug:
http://bugs.php.net/bug.php?id=40387
it seems this hidden input field does nothing at all to prevent an over
sized file from being uploaded.
Unless what I've read is incorrect, my suggestion is to remove the
above quoted text from the documentation so that others do not waste
their time trying to make it work as stated.
Thank you for all the great work everyone!
Reproduce code:
---------------
<form enctype="multipart/form-data" action="__URL__"
method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
<!-- Name of input element determines name in $_FILES array -->
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>
Expected result:
----------------
"This form element should always be used as it saves users the trouble
of waiting for a big file being transferred only to find that it was too
big and the transfer failed."
Actual result:
--------------
File uploads completely.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48437&edit=1