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

 ID:                 49196
 Comment by:         dev2bj at gmail dot com
 Reported by:        mikhail dot v dot gavrilov at gmail dot com
 Summary:            PHP could not understand multi files Web Forms 2.0
                     request
 Status:             Bogus
 Type:               Bug
 Package:            HTTP related
 Operating System:   *
 PHP Version:        5.3.0
 Block user comment: N

 New Comment:

Mike,



1. <input type="file" min="1" max="9999" name="file"/>



2. <input type="file" min="1" max="9999" name="file[]"/>



find difference.


Previous Comments:
------------------------------------------------------------------------
[2009-08-09 20:33:01] mikhail dot v dot gavrilov at gmail dot com

Thanks for quick responce, but my example another.



My code above on latest Opera browser allows select many files in one
field!



Please try example:



1) Create on your server index.html with next code:

<html>

  <body>

    <form action="upload.php" name="acp_users"
enctype="multipart/form-data" method="post">

      <input type="file" min="1" max="9999" name="file"/>

      <input type="submit" name="submit" value="Upload"/>

    </form>

  </body>

</html>



2) Create in same directory upload.php

<?php

  print_r($_FILES);

  print_r($_POST);

?>



3) Dowload latest Opera 10



4) enter url index.html on your server.



5) Press "Add files" and select few files (not one!!!)



6) Press "Upload" and see php script result.



Thanks for testing.



--

Best Regards,

Mike Gavrilov.

------------------------------------------------------------------------
[2009-08-09 14:52:02] j...@php.net

Wrong url, here's the complete page:



  http://www.php.net/manual/en/features.file-upload.multiple.php



------------------------------------------------------------------------
[2009-08-09 14:51:22] j...@php.net

Check the example 3 here:

  

  http://www.php.net/upload 



------------------------------------------------------------------------
[2009-08-08 08:39:57] mikhail dot v dot gavrilov at gmail dot com

Expected that array $_FILES would be filled, but instead recieve all
content in $_POST array, for example:



Array

(

    [file] =>

------------WABJYWB4BD24HFXX0Tt6AT

Content-Disposition: form-data; name="file"; filename="test.php"

Content-Type: application/octet-stream



Content of first file

------------WABJYWB4BD24HFXX0Tt6AT

Content-Disposition: form-data; name="file";
filename="SP0921700001.XML"

Content-Type: text/xml



Content of second file

------------WABJYWB4BD24HFXX0Tt6AT--

    [submit] => Upload

)

------------------------------------------------------------------------
[2009-08-08 07:53:02] mikhail dot v dot gavrilov at gmail dot com

Description:
------------
Opera browser a support Web Forms 2.0, it allows easy build uploading
multiple files form. Below given a fragment of html code demonstrates
it. (In file open dialog you can select few files)



<form action="upload.php" name="acp_users" enctype="multipart/form-data"
method="post">

   <input type="file" min="1" max="9999" name="file"/>

   <input type="submit" name="submit" value="Zagruzit"/>

</form>





Now the problem is that PHP does not understand http request from a
browser with multiple file's selected. ($_FILES array is empty).

Reproduce code:
---------------
Upload to server a few files through Opera, by described above method.



------------------------------------------------------------------------



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

Reply via email to