From 7b63355cbfea989a3c1fccddeb75a3f68bc74940 Mon Sep 17 00:00:00 2001 From: Victor J Rosario Date: Tue, 16 Jun 2026 00:37:11 -0400 Subject: [PATCH] fix: correct folder bundle upload progress % exceeding 100% Prefer file.progress.bytesTotal (set by TUS after CAR preprocessing) over file.size for virtual folder bundles, so numerator and denominator are in the same units (CAR bytes). Falls back to file.size before TUS has set bytesTotal. Fixes #521 --- libs/portal-plugin-dashboard/src/features/upload/Manager.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/portal-plugin-dashboard/src/features/upload/Manager.ts b/libs/portal-plugin-dashboard/src/features/upload/Manager.ts index 0f39465d0..da2fca750 100644 --- a/libs/portal-plugin-dashboard/src/features/upload/Manager.ts +++ b/libs/portal-plugin-dashboard/src/features/upload/Manager.ts @@ -247,10 +247,10 @@ export class Manager implements IUploadManager { // For folder bundles, use the size field const meta = file.meta as BundleMetadata; if (meta?.isVirtualBundle && meta?.displayAsFolder) { - if (file.size) { - totalBytes += file.size; + const bundleTotal = file.progress.bytesTotal || file.size; + if (bundleTotal) { + totalBytes += bundleTotal; } - // Use Uppy's built-in progress tracking if (file.progress.bytesUploaded) { uploadedBytes += file.progress.bytesUploaded; }