refactor: address code review comments

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-11 13:39:35 +00:00
parent 201984de96
commit 47a1de953d
2 changed files with 5 additions and 6 deletions
+2 -5
View File
@@ -229,11 +229,8 @@
}
function formatBytes(bytes) {
if (bytes === 0) return "0 Bytes";
const k = 1024;
const sizes = ["Bytes", "KB", "MB", "GB"];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return Math.round(bytes / Math.pow(k, i) * 100) / 100 + " " + sizes[i];
// Reuse the existing formatFileSize function from upload.js
return formatFileSize(bytes);
}
</script>
{% endblock %}