diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-11-18 15:47:19 +0100 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2022-11-18 17:14:47 +0000 |
commit | 259af058b0041d62d1df51d820d94809646cc775 (patch) | |
tree | 2026249fb0698e66e5fbf63e5aa9fdb7412faa13 /apps/files | |
parent | 1d753c83bffff928a4c46ef8ea31e3d808fb0c75 (diff) | |
download | nextcloud-server-259af058b0041d62d1df51d820d94809646cc775.tar.gz nextcloud-server-259af058b0041d62d1df51d820d94809646cc775.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')
-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(); }, |