Multiple Images uploading and previewing

[list=1]

[*]How can I allow the user to upload multiples images at once on a form. I tried to follow the example in guide 2 but when I select more than 1 image it says that I should select only 1 file.

[*]And after selecting the images I would like the user to view and give him/her the possibity to delete or change the images directly before even sending to the server how can I do that?

[/list]

  1. The multiple file example from the guide works…

Read again and compare carefully.

http://www.yiiframework.com/doc-2.0/guide-input-file-upload.html#uploading-multiple-files

Look for errors like a missing loop, or look if you used "imageFile" instead of "imageFiles".

Or if you have used "getInstance" instead of "getInstances".

  1. You could use something like this:

http://demos.krajee.com/widget-details/fileinput#advanced-usage

Regards

You gave me very very helpfull links; Thanks for that. I would like to know if after using that extension will I still use uploadfile extension of yii to access the files in the controller action? Because all the examples of Kartik is on views but I wonder how to work with it in the controller and the model.

Thanks!

Hey!

Yes - just try it out and experiment a little bit. ;)

Regards