Skip to content

refactor: upload progress calculation #5350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

ramiresviana
Copy link
Contributor

Description

Refactored and simplified the speed calculation logic by calculating speed and ETA once using the total uploaded bytes instead of per file. The upload store was also streamlined into a leaner setup-style implementation with private helpers, a simplified data structure, and a unified TypeScript type for uploads. Some logic was moved to components to keep the store holding only data and logic that is shared. Upload progress updates now occur on a fixed 1-second interval to ensure consistent refresh rates. Additionally, some fixes were addressed: starting speed from the first measured value instead of zero for accurate initial reporting, suppressing error notifications for aborted uploads, and counting empty files or folders as 1 byte so their progress is properly tracked.

fixes #5339

Checklist

Before submitting your PR, please indicate which issues are either fixed or closed by this PR. See GitHub Help: Closing issues using keywords.

  • I am aware the project is currently in maintenance-only mode. See README
  • I am aware that translations MUST be made through Transifex and that this PR is NOT a translation update
  • I am making a PR against the master branch.
  • I am sure File Browser can be successfully built. See builds and development.

@hacdias hacdias removed the request for review from o1egl August 6, 2025 06:39
@hacdias hacdias merged commit c14cf86 into filebrowser:master Aug 6, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Upload speed calculation
2 participants