Some developer may find it hard to upload several files using Zend Framework file component. In some cases developers may provide more than one file fields, say five(5) and when user tries to upload three files, so instead of uploading those three files, his files are simply ignored from being uploaded.
This is because Zend Framework uses receive function which first check all the file fields. If any of them is empty or unvalid, Zend Framwork file receive() function stop execution and none of the file uploaded.
A simple solution to this problem is to take file names of each file element and pass it to the receive function like
Note that receive function take a path to the file in form of string.
Consider you have the following file fields in your form
so in your controller/action
And so on, the above code will give you paths of each file field. Now
So these three files will be uploaded to the specified directory.