v-selectpage icon indicating copy to clipboard operation
v-selectpage copied to clipboard

Preload images on multiple upload

Open abelschooleman opened this issue 7 years ago • 6 comments

Is there a way to show images that are already on the server in the multiple upload? For example, when using the uploader for an existing record that already has files attached. In other words, is there an event listener or method that can be called to fill the uploadedFiles array?

abelschooleman avatar Sep 19 '18 17:09 abelschooleman

Did i missed something? v-selectpage can't upload files.

TerryZ avatar Sep 20 '18 01:09 TerryZ

My bad, this should be in the v-uploader repo. Don't know how that happened. Can you move it or should I repost there?

abelschooleman avatar Sep 20 '18 07:09 abelschooleman

There have one example in home page, the title is Single file upload, customize preview container default image

example:

<v-uploader preview-img="http://xxx.com/a.jpg" ></v-uploader>

preview-img option can set your customize image to be default image in preview container

TerryZ avatar Sep 20 '18 07:09 TerryZ

I found that option but it doesn't do what I'm looking for. I'm using this uploader to add multiple images to a model. That may be a new record but it can also be an existing record that is being edited. In the case of editing, that record may already have files attached. Instead of having 2 places where files can be manipulated, I'd like to load these already existing files into the uploader so users can remove them from there and attach a changed set of files to the record. I already have this set up on the component that features the v-uploader, I'm just looking for a way to add files to the uploadedFiles array without having to change your code.

abelschooleman avatar Sep 20 '18 07:09 abelschooleman

Unfortunately, the v-uploader multiple mode can not customize images in uploader container.

My suggest is build image thumbnail list yourself, and take uploaded images on the server show in that. Setup a button to delete the selected image(s), when plugin uploaded image complete, put the new image info into list.

This will be more complicated, but it can realize what your want.

TerryZ avatar Sep 20 '18 08:09 TerryZ

Ok, thanks. I'll cook something up :)

abelschooleman avatar Sep 21 '18 15:09 abelschooleman