From feda03b6eddf15469fc1615c97e9747076f1b3ef Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Fri, 18 Nov 2022 15:47:19 +0100 Subject: [PATCH] Also cancel XHR when cancelling uploads Fixes issue when cancelling a long list of uploads. Signed-off-by: Vincent Petry --- apps/files/js/file-upload.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 69f9d9d0e636f..a0b46e1d03bac 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -75,6 +75,11 @@ OC.FileUpload.prototype = { */ id: null, + /** + * Upload data structure + */ + data: null, + /** * Upload element * @@ -337,6 +342,10 @@ OC.FileUpload.prototype = { return } this.aborted = true; + if (this.data) { + // abort running XHR + this.data.abort(); + } this._delete(); },