Skip to content

Commit b4ab2a9

Browse files
authored
Merge pull request #35259 from nextcloud/bugfix/32354/fix-upload-actually-cancel-xhr
Also cancel XHR when cancelling uploads
2 parents 8e80f04 + feda03b commit b4ab2a9

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

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)