Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preload images on multiple upload #4

Open
abelschooleman opened this issue Sep 19, 2018 · 6 comments
Open

Preload images on multiple upload #4

abelschooleman opened this issue Sep 19, 2018 · 6 comments

Comments

@abelschooleman
Copy link

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?

@TerryZ
Copy link
Owner

TerryZ commented Sep 20, 2018

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

@abelschooleman
Copy link
Author

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?

@TerryZ
Copy link
Owner

TerryZ commented Sep 20, 2018

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

@abelschooleman
Copy link
Author

abelschooleman commented Sep 20, 2018

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.

@TerryZ
Copy link
Owner

TerryZ commented Sep 20, 2018

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.

@abelschooleman
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants