Skip to content

fix: correct folder bundle upload progress % exceeding 100%#980

Open
theequationagency-dev wants to merge 1 commit into
LumeWeb:developfrom
theequationagency-dev:fix/upload-progress-percentage-521
Open

fix: correct folder bundle upload progress % exceeding 100%#980
theequationagency-dev wants to merge 1 commit into
LumeWeb:developfrom
theequationagency-dev:fix/upload-progress-percentage-521

Conversation

@theequationagency-dev

@theequationagency-dev theequationagency-dev commented Jun 16, 2026

Copy link
Copy Markdown

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

only the 3-line block inside the if (meta?.isVirtualBundle && meta?.displayAsFolder) branch was modified, replacing file.size as the denominator with file.progress.bytesTotal || file.size to match units with bytesUploaded.

Fixes #521


Fix: Folder bundle upload progress percentage exceeding 100%

This PR fixes a bug where the upload progress percentage for folder bundles could exceed 100%.

Root Cause: When calculating progress for folder bundles, uploadedBytes was tracked using Uppy's built-in file.progress.bytesUploaded, but totalBytes was calculated using file.size. Since these values can differ (with bytesTotal potentially being smaller than file.size), the uploaded bytes could exceed the reported total, causing progress to go over 100%.

Fix: Changed totalBytes to prefer file.progress.bytesTotal over file.size, falling back to file.size only when bytesTotal is unavailable. This ensures both the numerator (bytesUploaded) and denominator (bytesTotal) come from the same tracking source, keeping the progress calculation consistent and within the 0–100% range.

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 LumeWeb#521
@kody-ai

kody-ai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug
Performance
Security
Business Logic

Access your configuration settings here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File upload processing %

1 participant