summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-11-18 15:47:19 +0100
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2022-11-18 17:14:47 +0000
commit259af058b0041d62d1df51d820d94809646cc775 (patch)
tree2026249fb0698e66e5fbf63e5aa9fdb7412faa13 /apps/files
parent1d753c83bffff928a4c46ef8ea31e3d808fb0c75 (diff)
downloadnextcloud-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.js9
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();
},