FileUpload with PDF preview.

Hi, im using spatie media file uploads and the spatie pdf-to-image package. But when im uploading a PDF there is no preview shown, even if the thumbnail gets generated. Regular images are shown as previews.

SpatieMediaLibraryFileUpload::make('file')
->conversion('thumb')
->collection('files')

SpatieMediaLibraryFileUpload::make('file')
->conversion('thumb')
->collection('files')
Is this expacted behavior? Or am im missing something. And if so, is there a way to show a thumb preview of the PDF, either with spatie or the regular fileupload?
Solution:
For anyone interested in this. Thats expected behaviour. Under the hood the file upload component uses filepond, which does not support PDF previews. There are plugins for filepond that make pdfs previewable but its not that easy to install these plugins in the filament filepond version. Another option is to use spatie pdf to image, which also required some manual coding.
Jump to solution
1 Reply
Solution
DocRampage
DocRampage9mo ago
For anyone interested in this. Thats expected behaviour. Under the hood the file upload component uses filepond, which does not support PDF previews. There are plugins for filepond that make pdfs previewable but its not that easy to install these plugins in the filament filepond version. Another option is to use spatie pdf to image, which also required some manual coding.
Want results from more Discord servers?
Add your server