/** * @param string $type * @return string */ public function getFilesizeNamaFileDisk($type = 'KB') { try { $file = new File($this->getRelativePathNamaFileDisk()); } catch (FileNotFoundException $err) { return '? ' . $type; } if ($file) { return FileSizeFormatter::formatBytes($file->getSize(), $type); } }
/** * @param string $type * @return string */ public function getFilesizeFotoDisk($type = 'KB') { $file = new File($this->getRelativePathFotoDisk()); return FileSizeFormatter::formatBytes($file->getSize(), $type); }