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

Question: populate images from server #856

Closed
ZigaVukcevicDev opened this issue May 28, 2018 · 6 comments
Closed

Question: populate images from server #856

ZigaVukcevicDev opened this issue May 28, 2018 · 6 comments
Labels

Comments

@ZigaVukcevicDev
Copy link

Hi,

is there any way to populate returned images from server into uppy dashboard?

Thank you in advance.

@arturi
Copy link
Contributor

arturi commented May 30, 2018

Hi,

You can update the preview for a specific file the Uppy Dashboard shows, by doing something like uppy.setFileState(fileID, { preview: 'http://myPreviewUrlFromServer' }).

Or are you asking about pre-populating it with files that are already on your server, like a media library?

@ZigaVukcevicDev
Copy link
Author

@arturi thank you for your response.

Yes, I was thinking of pre-populating with files that are already on server.

@ZigaVukcevicDev
Copy link
Author

@arturi can I expect another answer from you? :)

@nathandaly
Copy link

@be-codified I don't know if you've sorted this now but I achieved this with the uppy.addFile() method. I built a JSON array of uppy configuration objects representing all the files on the server. I grabbed the file contents of every image and converted them to base64 then on the client side looped over the JSON array and converted the base64 image representation back to a file blob before passing the file configuration object to the addFile() method.

@arturi
Copy link
Contributor

arturi commented Jun 23, 2018

@be-codified it’s on our todo, but we are focusing on other things to release Uppy 1.0, then we’ll look into the “gallery” idea once more. We’d be happy to link to your custom plugin that achieves this too 😉👍

@arturi
Copy link
Contributor

arturi commented Jan 22, 2019

Closing in favor of #450.

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

No branches or pull requests

3 participants