FileUpload preview gets 404 error
Hello.
I'm using FileUpload in one of my resource pages. I can upload it successfully and the file is viewable on my local development machine.
I've set the storage:link path to app/public.
When reloading the resource page, it recognizes that a file was uploaded.
However, clicking on the file (I've set as openable()) it gives me a URL that returns 404. The URL generated is:
http://localhost:8000/admin/storage/company/TT-2024-0003/media/custom_prefix-buildnmaintain.jpg
This is working:
http://localhost:8000/storage/company/TT-2024-0003/media/custom_prefix-buildnmaintain.jpg
The issue is '/admin' segment. Without it the file is viewable. Need help to be pointed in the right direction on how to configure this correctly.
Note: I'm using Jetstream with Laravel. I'm on Filament v3.1.25.
Solution:Jump to solution
I fixed the issue by removing the '/admin' that was included into my .env for for APP_URL.
So the value now reads as: APP_URL=http://localhost:8000...
1 Reply
Solution
I fixed the issue by removing the '/admin' that was included into my .env for for APP_URL.
So the value now reads as: APP_URL=http://localhost:8000