F
Filament8mo ago
bouly

FileUpload load image from /storage/... instead of /public/...

Hello, I am using FileUpload input to store an image in a "image" directory. The problem is : FileUpload try to find the image in /storage/image/... but the image is stored in /public/image. Thanks for your help!
Solution:
Sounds like your disks aren’t configured directly. Technically it should be stored in storage/images and you serve them publicly by running ‘php artisan storage:link’ this creates a symlink from public to the actual storage.
Jump to solution
4 Replies
Solution
awcodes
awcodes8mo ago
Sounds like your disks aren’t configured directly. Technically it should be stored in storage/images and you serve them publicly by running ‘php artisan storage:link’ this creates a symlink from public to the actual storage.
Dennis Koch
Dennis Koch8mo ago
Yes that’s how Laravels filesystem works and where the file should be stored.
bouly
boulyOP8mo ago
Thanks! But now I have a "CORS missing allow origin" :/ Edit : Ok, I changed https://www.domain.com to https://domain.com in .env file. Now it works. But I do not understand why..
toeknee
toeknee8mo ago
You need to read up on CORS really to understand that.
Want results from more Discord servers?
Add your server