From 36f2a2d94f04fae23d8ced5957c009935e8c2be6 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 648a5a0307bd8..fbbcea44fe34d 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(); },