-
Notifications
You must be signed in to change notification settings - Fork 63
Multiple Image Upload Single Field #207
Comments
No it doesn't. I wasn't aware this was possible, sorry. |
Take a look at html5 - multiple attribute. Thanks. |
On second thoughts, I'll reopen this as an enhancement. |
I have been customising the plugin all day and although I can get it to work for multiple files on a single upload field, this then breaks the single file upload. My approach was to loop the array of objects that the multiple attribute produces. This works nicely but the issue is that there is nothing to loop for a single file upload, so I tried to move the single array into a 0 index to mimic the structure of the multiple file object but of course once I do this the object in not a valid instance of Cake\ORM\Entity so the new ProfferPath fails. Seems to be a case of trying to fit a square peg into a round hole, perhaps it's just beyond me but I can't see an elegant solution other than a huge if statement and repeating masses of code to handle the two types of upload. I think I am beaten. |
My first thought is that the upload and processing of a single file works just fine. So the only thing which really needs to happen is checking if the submitted However I will qualify this by saying that I haven't looked at how the multiple file type input creates data in the request yet, so I am making an assumption here. |
Agreed, I thought it would be a case of just looping the request data but consider the difference between the single and mulltiple file uploads: Single file:
Mutliple:
The multiple upload objects is an array of objects which I think is due to the patchEntity called in my controller. If I debug the request before this is called then I do see an array of arrays which would be ideal. Any thoughts? |
I've managed to get this working, I will create the pull request tomorrow! |
Resolved, functionality has been developed and deployed now in release 0.8.1 |
Hi,
Does this plugin support multiple image uploads via a single field. I see that you have an example for multiple upload fields but not html5 multiple images on a single field.
TY.
The text was updated successfully, but these errors were encountered: