Add File model with getFileSizeInMB; pass sizeInStorage to show-documents

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-06 16:23:16 +05:00
parent fee24d1bce
commit 4d5098a921
3 changed files with 17 additions and 2 deletions

13
app/Models/File.php Normal file
View File

@@ -0,0 +1,13 @@
<?php
namespace App\Models;
class File
{
public static function getFileSizeInMB(int $bytes): string
{
if ($bytes <= 0) return '0';
$mb = $bytes / 1024 / 1024;
return number_format($mb, 2);
}
}