Skip to content

Commit

Permalink
Merge pull request #35266 from nextcloud/backport/35259/stable24
Browse files Browse the repository at this point in the history
[stable24] Also cancel XHR when cancelling uploads
  • Loading branch information
szaimen authored Nov 18, 2022
2 parents d9ad303 + 36f2a2d commit 0758d81
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/files/js/file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ OC.FileUpload.prototype = {
*/
id: null,

/**
* Upload data structure
*/
data: null,

/**
* Upload element
*
Expand Down Expand Up @@ -337,6 +342,10 @@ OC.FileUpload.prototype = {
return
}
this.aborted = true;
if (this.data) {
// abort running XHR
this.data.abort();
}
this._delete();
},

Expand Down

0 comments on commit 0758d81

Please sign in to comment.