Can't preview an image with 'private' disk when using spatie-laravel-media-library-plugin
Hi, I have field like this , Uploading works fine. But I can't preview this image when I view/edit the reocrd. here is the disk in my 'config/filesystems.php': . On the model, I do have this block . I checked the document "One way to store files privately is to configure this in your S3 bucket settings, in which case you should also use visibility('private') to ensure that Filament generates temporary URLs for your files.", but I just use a local 'private' disk. any insights on how to let 'Filament generates temporary URLs ' for my loal private files? thanks
4 Replies
help!
Is your
APP_URL
is correct? This gets me a lot. For my setup I need the port when running locally via composer run dev
:
but I just use a local 'private' disk. any insights on how to let 'Filament generates temporary URLs ' for my loal private files? thanksYou need to tell your disk how to generate private images and add a controller that serves those images.
File Storage - Laravel 12.x - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.