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

Asynchronous file upload or an event to see if all uploads are done #562

Open
MarijnSt opened this issue Sep 9, 2022 · 0 comments
Open
Labels
feature request New feature or request

Comments

@MarijnSt
Copy link

MarijnSt commented Sep 9, 2022

I have a file input that accepts multiple files and a custom uploader to upload them. It works fine for one file but it seems that multiple files are uploaded separately and synchronously which causes an issue when I try to upload them.

In my case each upload needs an access token to be completed and when this token is expired, I trigger a function that refreshes the tokens to try the upload again. But because the files are all uploaded at the same time, I'm having issues refreshing the tokens. It will fail on one file and trigger the refresh function but the other files don't use these updated tokens because their upload has already started before the refresh function was triggered.

I removed the function to refresh the tokens from my uploader but then I don't have a way to determine that all uploads are done and that I can refresh my tokens to eventually retry the upload.

I tried looking for a way to fix this issue with what is in the documentation but I can't find anything. Is there a way to solve this?
If not, it would be nice to have in the future.

@MarijnSt MarijnSt added the feature request New feature or request label Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant