php - Questions about multi-file upload on Android?
迷茫
迷茫 2017-07-05 09:55:54
0
2
828

Recently I am doing multi-file upload on Android. The background php is processed by move_upload_files(). How to handle multi-file upload on Android? Someone please guide me.

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all (2)
滿天的星座

Let the Android side simulate post file upload, and then the PHP background processes it according to the normal file upload similar to the web page.


If there are multiple pictures, our Android says there is no way to upload them in the form of a[] array with name, so it is stipulated that if there are 3 pictures, the names are: img_1, img_2, img_3, and the number of pictures num is passed at the same time. , after the php background gets the num, a for loop is used to obtain and save the files with assembly names img_1, img_2, and img_3.
So it’s not very clear whether Android can use name as an array to upload. If you know, please tell me. The above is a compromise method.

    某草草

    I just asked Android to put the image data in the hashMap object

    If there are multiple pictures, the key is file[], and the key for one picture is file. The value is the data above. . Form key-value pairs. Just pass it to the background.

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!