Multiple Images uploading and previewing


[*]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?


  1. The multiple file example from the guide works…

Read again and compare carefully.

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:


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.



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