|
@@ -674,7 +674,7 @@ class Uppy {
|
|
percentage: canHavePercentage
|
|
percentage: canHavePercentage
|
|
// TODO(goto-bus-stop) flooring this should probably be the choice of the UI?
|
|
// TODO(goto-bus-stop) flooring this should probably be the choice of the UI?
|
|
// we get more accurate calculations if we don't round this at all.
|
|
// we get more accurate calculations if we don't round this at all.
|
|
- ? Math.floor(data.bytesUploaded / data.bytesTotal * 100)
|
|
|
|
|
|
+ ? Math.round(data.bytesUploaded / data.bytesTotal * 100)
|
|
: 0
|
|
: 0
|
|
})
|
|
})
|
|
})
|
|
})
|
|
@@ -701,7 +701,7 @@ class Uppy {
|
|
const unsizedFiles = inProgress.filter((file) => file.progress.bytesTotal == null)
|
|
const unsizedFiles = inProgress.filter((file) => file.progress.bytesTotal == null)
|
|
|
|
|
|
if (sizedFiles.length === 0) {
|
|
if (sizedFiles.length === 0) {
|
|
- const progressMax = inProgress.length
|
|
|
|
|
|
+ const progressMax = inProgress.length * 100
|
|
const currentProgress = unsizedFiles.reduce((acc, file) => {
|
|
const currentProgress = unsizedFiles.reduce((acc, file) => {
|
|
return acc + file.progress.percentage
|
|
return acc + file.progress.percentage
|
|
}, 0)
|
|
}, 0)
|
|
@@ -721,7 +721,7 @@ class Uppy {
|
|
uploadedSize += file.progress.bytesUploaded
|
|
uploadedSize += file.progress.bytesUploaded
|
|
})
|
|
})
|
|
unsizedFiles.forEach((file) => {
|
|
unsizedFiles.forEach((file) => {
|
|
- uploadedSize += averageSize * (file.progress.percentage || 0)
|
|
|
|
|
|
+ uploadedSize += averageSize * (file.progress.percentage || 0) / 100
|
|
})
|
|
})
|
|
|
|
|
|
let totalProgress = totalSize === 0
|
|
let totalProgress = totalSize === 0
|