]> source.dussan.org Git - nextcloud-server.git/commitdiff
Also cancel XHR when cancelling uploads 35266/head
authorVincent Petry <vincent@nextcloud.com>
Fri, 18 Nov 2022 14:47:19 +0000 (15:47 +0100)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Fri, 18 Nov 2022 17:19:21 +0000 (17:19 +0000)
Fixes issue when cancelling a long list of uploads.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
apps/files/js/file-upload.js

index 648a5a0307bd870fc2dd8b535517e54c007eef3d..fbbcea44fe34d43fad4b20cf1039ae8aee914d77 100644 (file)
@@ -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();
        },