diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-11-18 15:47:19 +0100 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2022-11-18 15:47:19 +0100 |
commit | feda03b6eddf15469fc1615c97e9747076f1b3ef (patch) | |
tree | 779d40c6fb08a41fcd2315d453152542db3a5c57 /apps/files/js | |
parent | 473647a467d807703818f3d9f55352825a345bea (diff) | |
download | nextcloud-server-feda03b6eddf15469fc1615c97e9747076f1b3ef.tar.gz nextcloud-server-feda03b6eddf15469fc1615c97e9747076f1b3ef.zip |
Also cancel XHR when cancelling uploads
Fixes issue when cancelling a long list of uploads.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/file-upload.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 69f9d9d0e63..a0b46e1d03b 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -76,6 +76,11 @@ OC.FileUpload.prototype = { id: null, /** + * Upload data structure + */ + data: null, + + /** * Upload element * * @type Object @@ -337,6 +342,10 @@ OC.FileUpload.prototype = { return } this.aborted = true; + if (this.data) { + // abort running XHR + this.data.abort(); + } this._delete(); }, |