Private Images from table and forms not generating temp url
Package
filament/filament
Package Version
v3.2
Laravel Version
v11.31
Livewire Version
v3.5
PHP Version
PHP 8.2.13
Problem description
There’s something wrong with the private image. It can't render in the table or the form. I already ran optimize:clear and also tried composer dumpautoload. I also gave full permissions to the storage folder. I checked the database, and it saved the URL path of the file correctly, but the file itself doesn't appear in the target path. Since it didn’t show up in the private/local directory, I manually placed the file there and renamed it according to the database entry, but it’s still the same - no image appears in the table or in the form preview.
database table students.profile:
form:
table column:
img src:
Expected behavior
After uploading a private image, the file should be saved to the correct storage path, and the image should be visible in the table and form preview without any manual intervention.
Steps to reproduce
Steps to reproduce:
- Create a form field using FileUpload with visibility('private').
- Upload an image using the form.
- Save the form.
- Check the database - the image path is saved correctly.
- Check the storage/private or storage/local directory - the file is missing.
- Visit the table or edit form - the image does not render.
Reproduction repository (issue will be closed if this is not valid)
https://github.com/JayDoesPHP/filament-private-image-bug.git
Relevant log output
My first thought was that visibility works only with services that actually support private files such as S3: https://filamentphp.com/docs/3.x/panels/installation#using-a-production-ready-storage-disk
But I found this article on how to enable temporary URLs with the local disk: https://dev.to/abrardev99/laravel-temporary-url-for-local-storage-driver-50of
Filament uses the disk's temporary URL thing. Let me know if that helps!
Thanks @Saad5400, that is correct!