I am using uploadify plugin of jquery and have set multiple files upload to true. How do i retrieve these files on the server side?
We need to specify file input name in files array $_FILES['fileInputName']
. But i have only 1 file input present on the form which is submitting multiple files. How do i retrieve them all?
Thanks in advance :)
Uploadify invokes an upload script for each uploaded file separately.
As far as I know, there is no way to tell inside the PHP upload script whether the current upload is the final one in the queue.
You need to make use of the onComplete
and onAllComplete
callbacks on client side. Inside onComplete
, you would add each succeeded upload to an array. In onAllComplete
, you could make an Ajax request sending the list of uploaded files to a PHP script.