feat: find large files utility (#18040)

feat: large asset utility

Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
Alwin Lohrie 2025-07-29 00:48:39 +02:00 committed by GitHub
parent 7d759edfcc
commit ae1d60e259
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 964 additions and 4 deletions

View file

@ -275,9 +275,9 @@ export function isFlipped(orientation?: string | null) {
return value && (isRotated270CW(value) || isRotated90CW(value));
}
export function getFileSize(asset: AssetResponseDto): string {
export function getFileSize(asset: AssetResponseDto, maxPrecision = 4): string {
const size = asset.exifInfo?.fileSizeInByte || 0;
return size > 0 ? getByteUnitString(size, undefined, 4) : 'Invalid Data';
return size > 0 ? getByteUnitString(size, undefined, maxPrecision) : 'Invalid Data';
}
export function getAssetResolution(asset: AssetResponseDto): string {