From 25010962ff0a7eb34d531684ef3c9d861dfe4a86 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Thu, 9 Jan 2025 13:41:52 +0800 Subject: [PATCH] fix double upload progress fixes #5585 --- packages/@uppy/status-bar/src/StatusBar.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/@uppy/status-bar/src/StatusBar.tsx b/packages/@uppy/status-bar/src/StatusBar.tsx index 300c3a71e0..5e5e3859a7 100644 --- a/packages/@uppy/status-bar/src/StatusBar.tsx +++ b/packages/@uppy/status-bar/src/StatusBar.tsx @@ -197,13 +197,13 @@ export default class StatusBar extends UIPlugin< totalSize! += file.progress.bytesTotal || 0 totalUploadedSize += file.progress.bytesUploaded || 0 }) + } else { + // however uploaded size we will always have + startedFiles.forEach((file) => { + totalUploadedSize += file.progress.bytesUploaded || 0 + }) } - // however uploaded size we will always have - startedFiles.forEach((file) => { - totalUploadedSize += file.progress.bytesUploaded || 0 - }) - const totalETA = this.#computeSmoothETA({ uploaded: totalUploadedSize, total: totalSize,