CTOlet / yii2-attachments

Yii2 extension for uploading and attaching the files to the models
66 stars 57 forks source link

Uploading additional file is confusing as existing files disappear #30

Open jonazu opened 9 years ago

jonazu commented 9 years ago

This is what I do:

  1. I add some files and save.
  2. I update the dataset again and add another file.
  3. Existing files disappear. The user will be confused: "Are the files deleted now?", "Do I have to upload all the files again?"
  4. Upon saving one will see that the old files are still there and the additional file is just added as we wanted to.

It is not a big problem, but if there is an easy way to fix this, I would appreciate it very much.

zivoradantonijevic commented 8 years ago

When calling widget, use this:

'pluginOptions' => [ // Plugin options of the Kartik's FileInput widget 'maxFileCount' => 10, // Client max files 'overwriteInitial' => false, ]