-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
catching a completed abort of file upload #165
Comments
Good suggestion, I will implement it for the next version.
It would only work for HTML5 browsers only. |
Thanks for the great uploader code and the quick response on this request. I tried that hack and it needed to be yet a little more hacky, because when this is first executed __XHR does not always exist. Anyhow (for anyone trying to implement this for the time being) the following works for me:
|
So it turns out this is not as simple as I thought. Now that I have been able to test this it seems progress will still fire after the "abort" event listener has fired. I think this feature may still be useful for many cases, but for my particular case where I have checks in .progress to set states and then want to reset those states once abort has fired it doesn't work so well. I suppose setting things every time .progress fires is a bit of a hack in itself, but it doesn't seem that there is an upload.start method to allow for doing this just once. |
try |
The new version 1.2.10 has this function to enable attach arbitrary listeners to XHR.
The Demo page already include this function. |
Is there an easy way to fire some custom actions once the cancelled upload has actually stopped?
If I wrap the call to $upload.abort in my own function it doesn't work as the transfer is often still in progress for a moment after I call it and I don't want to resort to setting timeouts.
The text was updated successfully, but these errors were encountered: