芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/app/Models/FileStorage.php
path . '/' . $this->filename); } public function getSizeFormatAttribute(): string { $bytes = $this->size; if ($bytes >= 1073741824) { return number_format($bytes / 1073741824, 2) . ' GB'; } if ($bytes >= 1048576) { return number_format($bytes / 1048576, 2) . ' MB'; } if ($bytes >= 1024) { return number_format($bytes / 1024, 2) . ' KB'; } if ($bytes > 1) { return $bytes . ' bytes'; } if ($bytes == 1) { return $bytes . ' byte'; } return '0 bytes'; } }