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

Canceling a File Upload #22

Open
bunyaminsg opened this issue May 16, 2019 · 4 comments
Open

Canceling a File Upload #22

bunyaminsg opened this issue May 16, 2019 · 4 comments
Assignees

Comments

@bunyaminsg
Copy link

Since it may take a while to upload big files, I want the users to be able to cancel it while it's uploading (i.e. before filePick output event triggered). Is there a way to send an event to the file picker directive to stop uploading?

@fvilers
Copy link
Owner

fvilers commented May 20, 2019

Hi! The filePick event occurs when the file has been read from the filesystem, not when it has been uploaded (this is yours to implement). I'll do some testing to see how we could cancel the read operation if it could help you.

Stay tuned ;-)

@fvilers fvilers self-assigned this May 20, 2019
@bunyaminsg
Copy link
Author

Sorry for the confusion, I meant canceling the reading from the filesystem. Btw, I was using FileReader.abort() method to cancel the read operation in my own implementation, maybe it helps you. Thanks!

@fvilers
Copy link
Owner

fvilers commented May 20, 2019

This is exactly what I was thinking of but I need to refactor how it's currently implemented. Moreover, if you select multiple files, do you expect the abortion to be on all the files or just the one currently read?

@bunyaminsg
Copy link
Author

In the UI, I was trying to achieve something like:

  • File1 [>>> Loading ] [x Cancel]
  • File2 [>>> Loading ] [x Cancel]

So, in my specific use case, it's better to have a file-by-file cancellation option. However, I don't know what is the common behavior of the similar libraries.

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