mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Merge pull request #35259 from nextcloud/bugfix/32354/fix-upload-actually-cancel-xhr
Also cancel XHR when cancelling uploads
This commit is contained in:
commit
b4ab2a9358
1 changed files with 9 additions and 0 deletions
|
|
@ -75,6 +75,11 @@ OC.FileUpload.prototype = {
|
|||
*/
|
||||
id: null,
|
||||
|
||||
/**
|
||||
* Upload data structure
|
||||
*/
|
||||
data: null,
|
||||
|
||||
/**
|
||||
* Upload element
|
||||
*
|
||||
|
|
@ -337,6 +342,10 @@ OC.FileUpload.prototype = {
|
|||
return
|
||||
}
|
||||
this.aborted = true;
|
||||
if (this.data) {
|
||||
// abort running XHR
|
||||
this.data.abort();
|
||||
}
|
||||
this._delete();
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue