Multiple file upload


I would like to upload many images (up to 200) with one form.
What is the best way to do that?
I imagine to have a form for selecting the images on my local client side, and then loading the files up one by one. How can I do that?
Would the CakePHP Upload Plugin 3.0 be helpfull for that?
I tried the normal way with XAMPP. It worked fine up to 19 images. With more than that, it didn’t work, $this->request->data is empty.
I am using Cake 3.7.

Thank your very much for any helpful idea.

First of all, welcome to cake php! also, did u try with examples of the documentation? also, most important of all, would u please share of your code, so that we need to see what’s the error happening with the upload. Have a good day!

PHP limits the size of uploads and POST requests (post_max_size and upload_max_filesize I think). Sounds like 19 images come under that limit, adding more goes over that limit so is rejected.

Worth checking anyway.

Thank you for your answers.

I set the post_max_size in the php.ini to 0M which means, the limit is disabled.
That helped. Now I can upload 200 images!

Thank you very much, I am very happy.


What you could do is use AJAX to send those files one by one.
This way you can bump up the POST limit to like 100MB (which is already a huge image) instead of 2GB.
Doing this also allows you to continue uploading even if one file fails.

For an example of how I did this view these pieces of code: