joaopaulolndev / filament-pdf-viewer

FilamentPHP package to show pdf documents with records saved in the database or show documents without a database in the form of your resource.
MIT License
64 stars 11 forks source link

[Bug]: Joaopaulolndev\FilamentPdfViewer\Forms\Components\PdfViewerField::getFileUrl(): Return value must be of type string, null returned #12

Open beyerenrico opened 2 weeks ago

beyerenrico commented 2 weeks ago

What happened?

If I edit a record and remove the file, the PDF Viewer still renders. If I then try to upload a new file I get the error

Joaopaulolndev\FilamentPdfViewer\Forms\Components\PdfViewerField::getFileUrl(): Return value must be of type string, null returned

How to reproduce the bug

  1. Create new record
  2. Edit record and remove file
  3. Try to upload new file and the error should appear

Package Version

1.0.6

PHP Version

8.2.0

Laravel Version

11.30.0

Which operating systems does with happen with?

macOS

Notes

No response

1blj commented 1 week ago

yes, i have the same issue, here,

PHP 8.3.10 — Laravel 11.31.0

pdfviewererror

Kwenziwa commented 1 week ago

Im having the same issue too. Also is ->visible() function available?

Screenshot 2024-11-17 at 7 51 08 PM