Skip to content

Commit 0758d81

Browse files
authored
Merge pull request #35266 from nextcloud/backport/35259/stable24
[stable24] Also cancel XHR when cancelling uploads
2 parents d9ad303 + 36f2a2d commit 0758d81

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

apps/files/js/file-upload.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ OC.FileUpload.prototype = {
7575
*/
7676
id: null,
7777

78+
/**
79+
* Upload data structure
80+
*/
81+
data: null,
82+
7883
/**
7984
* Upload element
8085
*
@@ -337,6 +342,10 @@ OC.FileUpload.prototype = {
337342
return
338343
}
339344
this.aborted = true;
345+
if (this.data) {
346+
// abort running XHR
347+
this.data.abort();
348+
}
340349
this._delete();
341350
},
342351

0 commit comments

Comments
 (0)