#47789 [Bgs]: Opera file upload - multiple files from one input cannot be handled
ID: 47789
User updated by: michal dot aichinger at gmail dot com
Reported By: michal dot aichinger at gmail dot com
Status: Bogus
Bug Type: *General Issues
Operating System: Windows / Linux
PHP Version: 5.2.9
New Comment:
I am pretty shure that this is bug. PHP does not respect
multipart/mixed part in POST request and it is clearly a bug. This part
is valid and is made only by Opera in this example.
Previous Comments:
------------------------------------------------------------------------
[2009-03-31 07:20:07] jani@php.net
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2009-03-26 14:33:55] michal dot aichinger at gmail dot com
Description:
------------
Code below makes form with one file input. In Opera and Safari 4 it is
possible select more than one file in this input. If you send this form
in Safari it is in PHP normaly handled like multi file upload (multiple
inputs). Upload from Opera caused empty $_FILES array.
The diference between this browsers is that Opera use multipart/mixed
for packing files from this input when posting data.
Reproduce code:
---------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="cs" lang="cs">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Multiupload</title>
</head>
<body>
<h1>Multiupload</h1>
<form action="test.php" method="post"
enctype="multipart/form-data">
<input type="file" name="files[]" multiple="multiple"
min="0" max="5"
/>
<input type="submit" />
</form>
<pre>
<?php
print_r($_FILES);
?>
</pre>
</body>
</html>
Expected result:
----------------
full $_FILES array after sending more files selected in files[] input
from Opera
Actual result:
--------------
array is empty
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47789&edit=1
Thread (10 messages)