feat: Implement Fast Request feature with file upload and request management

This commit is contained in:
2026-08-26 17:40:45 +03:30
parent ba734679cf
commit 2d96978c38
33 changed files with 1294 additions and 852 deletions
+13
View File
@@ -0,0 +1,13 @@
const sizes = ['B', 'KB', 'MB', 'GB']
export const formatFileSize = (bytes) => {
if (!bytes) {
return `0 ${sizes[0]}`
}
const k = 1024
const i = Math.floor(Math.log(bytes) / Math.log(k))
const formattedSize = parseFloat((bytes / Math.pow(k, i)).toFixed(1))
return `${formattedSize} ${sizes[i]}`
}