Skip to content
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

@uppy/status-bar: fix double upload progress #5587

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

mifi
Copy link
Contributor

@mifi mifi commented Jan 9, 2025

fixes #5585

Copy link
Contributor

github-actions bot commented Jan 9, 2025

Diff output files
diff --git a/packages/@uppy/status-bar/lib/StatusBar.js b/packages/@uppy/status-bar/lib/StatusBar.js
index 0bb3eb7..96bf889 100644
--- a/packages/@uppy/status-bar/lib/StatusBar.js
+++ b/packages/@uppy/status-bar/lib/StatusBar.js
@@ -150,10 +150,11 @@ export default class StatusBar extends UIPlugin {
         totalSize += file.progress.bytesTotal || 0;
         totalUploadedSize += file.progress.bytesUploaded || 0;
       });
+    } else {
+      startedFiles.forEach(file => {
+        totalUploadedSize += file.progress.bytesUploaded || 0;
+      });
     }
-    startedFiles.forEach(file => {
-      totalUploadedSize += file.progress.bytesUploaded || 0;
-    });
     const totalETA = _classPrivateFieldLooseBase(this, _computeSmoothETA)[_computeSmoothETA]({
       uploaded: totalUploadedSize,
       total: totalSize,

@Murderlon Murderlon changed the title fix double upload progress @uppy/status-bar: fix double upload progress Jan 9, 2025
@Murderlon Murderlon merged commit 817ce72 into main Jan 9, 2025
16 checks passed
@Murderlon Murderlon deleted the fix-double-upload-progress branch January 9, 2025 09:47
@github-actions github-actions bot mentioned this pull request Jan 9, 2025
github-actions bot added a commit that referenced this pull request Jan 9, 2025
| Package                    | Version | Package                    | Version |
| -------------------------- | ------- | -------------------------- | ------- |
| @uppy/audio                |   2.1.1 | @uppy/instagram            |   4.2.1 |
| @uppy/aws-s3               |   4.2.1 | @uppy/onedrive             |   4.2.2 |
| @uppy/box                  |   3.2.1 | @uppy/progress-bar         |   4.2.1 |
| @uppy/companion-client     |   4.4.1 | @uppy/provider-views       |   4.4.1 |
| @uppy/compressor           |   2.2.1 | @uppy/react                |   4.2.1 |
| @uppy/core                 |   4.4.1 | @uppy/remote-sources       |   2.3.1 |
| @uppy/dashboard            |   4.3.1 | @uppy/screen-capture       |   4.2.1 |
| @uppy/drag-drop            |   4.1.1 | @uppy/status-bar           |   4.1.1 |
| @uppy/drop-target          |   3.1.1 | @uppy/thumbnail-generator  |   4.1.1 |
| @uppy/dropbox              |   4.2.1 | @uppy/transloadit          |   4.2.1 |
| @uppy/facebook             |   4.2.1 | @uppy/tus                  |   4.2.1 |
| @uppy/file-input           |   4.1.1 | @uppy/unsplash             |   4.3.1 |
| @uppy/form                 |   4.1.1 | @uppy/url                  |   4.2.1 |
| @uppy/golden-retriever     |   4.1.1 | @uppy/vue                  |   2.1.1 |
| @uppy/google-drive         |   4.3.1 | @uppy/webcam               |   4.1.1 |
| @uppy/google-drive-picker  |   0.3.2 | @uppy/webdav               |   0.3.1 |
| @uppy/google-photos        |   0.5.1 | @uppy/xhr-upload           |   4.3.2 |
| @uppy/google-photos-picker |   0.3.2 | @uppy/zoom                 |   3.2.1 |
| @uppy/image-editor         |   3.3.1 | uppy                       |  4.12.2 |
| @uppy/informer             |   4.2.1 |                            |         |

- @uppy/provider-views: Import types consistently from @uppy/core (Merlijn Vos / #5589)
- @uppy/status-bar: fix double upload progress (Mikael Finstad / #5587)
- @uppy/provider-views: fix incorrect import (Merlijn Vos / #5588)
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.

Uppy status bar reports double the actual file size reported for upload progress with custom plugin
2 participants