You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a form that accepts a PDF file upload (handled by the plugin). It also accepts a thumbnail image, but in case that is null the app generates a thumbnail from the first page of the PDF.
I've tried to hook into the afterCreate lifecycle hook of the creation process to check for that. What happens is no media is available on the record, even though in the database row is added.
Package
filament/spatie-laravel-media-library-plugin
Package Version
v3.2.97
Laravel Version
v11.19.0
Livewire Version
v3.5.4
PHP Version
PHP 8.2.22
Problem description
I have a form that accepts a PDF file upload (handled by the plugin). It also accepts a thumbnail image, but in case that is null the app generates a thumbnail from the first page of the PDF.
I've tried to hook into the
afterCreate
lifecycle hook of the creation process to check for that. What happens is no media is available on the record, even though in the database row is added.In this instance
$pdf
returns null. Note that I am not using database transactions.Expected behavior
I would expect to already have media available here in this lifecycle hook.
Steps to reproduce
afterCreate
method:$pdf
should be an instance of Media here.Reproduction repository (issue will be closed if this is not valid)
https://github.com/slovenianGooner/filament-issue-demo
Relevant log output
No response
Donate 💰 to fund this issue
The text was updated successfully, but these errors were encountered: