image not loading but accessible via URL

Hi am uploading an image and i also run php artisan storage:link and still image is not loading this is the error am getting
No description
Solution:
There is your problem.
Jump to solution
11 Replies
toeknee
toekneeβ€’9mo ago
That tells you straight away. CORS Error, so you are loading from a different url to what your application is serving
Adnan Yalahow
Adnan YalahowOPβ€’9mo ago
would you please provide any solutions
toeknee
toekneeβ€’9mo ago
Load the image over the same domain. Where do you get that error in filament or outside filament?
Adnan Yalahow
Adnan YalahowOPβ€’9mo ago
I am confused but i think it's outside filament and here is what i did
Forms\Components\FileUpload::make('logo')
Forms\Components\FileUpload::make('logo')
nothing else and i run php artisan storage:link
toeknee
toekneeβ€’9mo ago
Well, you are either in filament or outside of filament. If the error occurs when uploading an image in a filament form... what is the domain with the error in that screenshot, what is your laravel app_url in the .env
Adnan Yalahow
Adnan YalahowOPβ€’9mo ago
this is my app_url in the .env APP_URL=http://localhost:8000 and this is my actual url http://127.0.0.1:8000/settings/organization-details/1/edit
Solution
toeknee
toekneeβ€’9mo ago
There is your problem.
toeknee
toekneeβ€’9mo ago
Chang eyou APP_URL to http://127.0.0.1:8000
Adnan Yalahow
Adnan YalahowOPβ€’9mo ago
oh now it''s working πŸ˜† thank you very much
Adnan Yalahow
Adnan YalahowOPβ€’9mo ago
one more hand please i want to show the actual image to the user instead of this gray placeholder
No description
toeknee
toekneeβ€’9mo ago
->preview()
Want results from more Discord servers?
Add your server