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

Example of uploadMultiple usage #469

Open
divan opened this issue Jan 10, 2021 · 3 comments
Open

Example of uploadMultiple usage #469

divan opened this issue Jan 10, 2021 · 3 comments

Comments

@divan
Copy link

divan commented Jan 10, 2021

Upploader v2 introduced support for multiple files upload.
However, there is no example or docs on how to use this feature.

Docs say custom uploader needed to be written, but it's not clear from the custom uploader interface, how to handle multiple files upload. After looking into the source code, it becomes clear that there is a new interfaces/function needed to be implemented - uploadMultiple. I've tried to implement it, and somehow it doesn't work – latest Uppload v2 still tries to use upload uploader instead of uploadMultiple.

I tried to remove upload version (for single files) and upload multiple files – and that leads to the error message "no uploader".

Also, I'm a bit confused by interface of uploadMultiple – it returns a single String. Is it supposed to be a URL of the first or last image? Would be nice to return an array of urls, so they can be displayed as multiple previews. (Single URL also works for me, but that's confusing part too).

Would be awesome to see some example of using multiple upload. I think docs makes it pretty clear that multiple upload is going to be limited – that's ok. Just a bit more information/help on how to make an uploader for that feature.

Thanks for a great tool!

@AnandChowdhary
Copy link
Contributor

Did you specify the multiple: true option? I think that's required to tell Uppload to use uploadMultiple instead of upload: https://uppload.js.org/multiple-files#uploading-multiple-files

@divan
Copy link
Author

divan commented Jan 11, 2021

Yes, I did from the start.

So for multiple mode, both upload and uploadMultiple are required or just latter?

@AnandChowdhary
Copy link
Contributor

Just the latter. :)

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

No branches or pull requests

2 participants