Skip to content

Commit 817ce72

Browse files
authored
@uppy/status-bar: fix double upload progress (#5587)
fix double upload progress fixes #5585
1 parent 0215c5a commit 817ce72

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/@uppy/status-bar/src/StatusBar.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,13 @@ export default class StatusBar<M extends Meta, B extends Body> extends UIPlugin<
197197
totalSize! += file.progress.bytesTotal || 0
198198
totalUploadedSize += file.progress.bytesUploaded || 0
199199
})
200+
} else {
201+
// however uploaded size we will always have
202+
startedFiles.forEach((file) => {
203+
totalUploadedSize += file.progress.bytesUploaded || 0
204+
})
200205
}
201206

202-
// however uploaded size we will always have
203-
startedFiles.forEach((file) => {
204-
totalUploadedSize += file.progress.bytesUploaded || 0
205-
})
206-
207207
const totalETA = this.#computeSmoothETA({
208208
uploaded: totalUploadedSize,
209209
total: totalSize,

0 commit comments

Comments
 (0)