Merge pull request #35259 from nextcloud/bugfix/32354/fix-upload-actually-cancel-xhr

Also cancel XHR when cancelling uploads
This commit is contained in:
Simon L 2022-11-18 18:06:05 +01:00 committed by GitHub
commit b4ab2a9358
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();
},