Edit report at http://bugs.php.net/bug.php?id=47789&edit=1

 ID:               47789
 Comment by:       sowingsadness at gmail dot com
 Reported by:      michal dot aichinger at gmail dot com
 Summary:          Opera file upload - multiple files from one input
                   cannot be handled
 Status:           Bogus
 Type:             Bug
 Package:          *General Issues
 Operating System: Windows / Linux
 PHP Version:      5.2.9

 New Comment:

http://tools.ietf.org/html/rfc1867





>3.3 use of multipart/form-data

>   The definition of multipart/form-data is included in section 7.  A

>   boundary is selected that does not occur in any of the data. (This

>   selection is sometimes done probabilisticly.) Each field of the
form

>   is sent, in the order in which it occurs in the form, as a part of

>   the multipart stream.  Each part identifies the INPUT name within
the

>   original HTML form. Each part should be labelled with an
appropriate

>   content-type if the media type is known (e.g., inferred from the
file

>   extension or operating system typing information) or as

>   application/octet-stream.

>

>   If multiple files are selected, they should be transferred together

>   using the multipart/mixed format.


Previous Comments:
------------------------------------------------------------------------
[2010-06-19 18:28:28] spamdeja at mail dot ru

It's true bug of php

------------------------------------------------------------------------
[2009-03-31 07:32:34] michal dot aichinger at gmail dot com

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.

------------------------------------------------------------------------
[2009-03-31 07:20:07] j...@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/bug.php?id=47789&edit=1

Reply via email to