add pdf-cover

This commit is contained in:
isUnknown 2024-11-28 16:56:55 +01:00
parent bd95cf4613
commit 7cc2b2a9e8
19 changed files with 119 additions and 11 deletions

View file

@ -17,6 +17,7 @@ function getFileData($file) {
if($file->extension() == "pdf") {
$data['comments'] = $file->comments()->exists() && $file->comments() ? Data::decode($file->comments()->value(), 'yaml') : [];
$data['cover'] = $file->cover()->exists() && $file->cover()->isNotEmpty() ? $file->cover()->toFile()->resize(576)->url() : false;
}
return $data;