Merge remote-tracking branch 'origin/feature/0915_素材中心新增手动上传' into test

This commit is contained in:
rd
2025-09-22 11:23:49 +08:00
9 changed files with 188 additions and 118 deletions

View File

@ -120,7 +120,7 @@ export function formatFileSize(bytes: number): string {
if (bytes === 0) return '0 Bytes';
const k = 1024;
const sizes = ['Bytes', 'kb', 'mb', 'gb', 'tb'];
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];