We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4e20ff commit f6c1661Copy full SHA for f6c1661
1 file changed
apps/dashboard/app/utils/uploadFile.ts
@@ -77,7 +77,7 @@ export const uploadFile = async (
77
totalLoaded += sent;
78
79
const speed = totalLoaded / ((Date.now() - startedAt) / 1000);
80
- const percent = Math.round((totalLoaded / file.size) * 100);
+ const percent = clamp(Math.round((totalLoaded / file.size) * 100), 0, 100);
81
const eta = Math.round((file.size - totalLoaded) / speed);
82
83
uploadingFile.status!.progress = {
0 commit comments