feat(comments): add secure CSV/PDF export for version comments with auth, rate limits, and CSV injection hardening

This commit is contained in:
Yusuf İpek
2026-02-22 13:56:02 +03:00
parent 47f12b38fa
commit 72d14f4a5d
5 changed files with 604 additions and 2 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ export const metadata: Metadata = {
function formatBytes(bytes: number, decimals = 2) {
if (bytes < 0) return 'Error Fetching';
if (!+bytes) return '0 Bytes';
const k = 1024;
const k = 1000;
const dm = decimals < 0 ? 0 : decimals;
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));