Detail view not displaying correctly for pdf file
warksit opened this issue · comments
Describe the bug
An uploaded pdf file displays on a resources detail page as "This image could not be found". "This image" is a link to the pdf file.
To Reproduce
Steps to reproduce the behavior:
- Upload PDF file
- Viiew detail page of resource
Expected behavior
Expected a download link similar the the standard Nova File Field
Desktop (please complete the following information):
- Laravel Version: [ex: 8.62]
- Browser and Version: [ex: Firefox 94.0.1]
- Nova File Upload Field Package Version: [ex: 0.4.0]
I may be missing something!
The relevant fields section of the resource (standard Nova File Field just there for reference):
File::make('Nova File Field', 'file')->exceptOnForms(),
FileUpload::make("FileUpload Field", 'file')
->path("public")
->creationRules('required', 'mimes:pdf', 'max:5000')
->updateRules('sometimes', 'mimes:pdf', 'max:5000')
->hideFromIndex()
->prunable(),
@warksit Thanks for writing in. I believe this is because the file upload field does not extract thumbnails from PDFs. Only image files (likely bitmaps) would have thumbnails available.
Re-opening: I would be happy to consider a PR for this issue.
OK, thanks for the response. Let me look into the code and see what needs to be done