F
Filamentβ€’8mo ago
Felix

FileUpload loading image fails

Hello, I want to use the FileUpload. But when I have saved an image, it does not show it self and is also not downloadable. what am I doing wrong?
No description
Solution:
Because your .env APP_URL is set incorrectly.
Jump to solution
7 Replies
toeknee
toekneeβ€’8mo ago
right click inspect, what does the console say? I have a feeling you have a cors issue and your urls are not set correct.
Felix
FelixOPβ€’8mo ago
It seems the FileUpload is not searching for the local storage, but for this: https://admin.webinary.test/live/events/2/webinary.test/storage/Cat03.jpg. I dont know why. Also the the Input is just this: FileUpload::make('header_image'),;
Solution
toeknee
toekneeβ€’8mo ago
Because your .env APP_URL is set incorrectly.
Felix
FelixOPβ€’8mo ago
It is just:webinary.test. But why it would look with such an odd url. the img can be found in the url: https://admin.webinary.test/Cat03.jpg and https://dashboard.webinary.test/Cat03.jpg.
toeknee
toekneeβ€’8mo ago
it should be: https://admin.webinary.test https://admin.webinary.test/live/events/ is the page, but because you entered a domain and not the URL you are getting a current url with the domain. That's why you need to set the APP_URL Correctly.
Felix
FelixOPβ€’8mo ago
I have tried it, and now the hole website doesn't work. πŸ˜• I want to note that the website has multiple (sub) domain names. I think I see the problem. I used the APP_URL wrongly. In my code.πŸ˜…
Nilson Alves
Nilson Alvesβ€’8mo ago
unlink
Want results from more Discord servers?
Add your server