aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-11-18 15:47:19 +0100
committerVincent Petry <vincent@nextcloud.com>2022-11-18 15:47:19 +0100
commitfeda03b6eddf15469fc1615c97e9747076f1b3ef (patch)
tree779d40c6fb08a41fcd2315d453152542db3a5c57 /apps/files/js
parent473647a467d807703818f3d9f55352825a345bea (diff)
downloadnextcloud-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.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();
},