How to access in browser a storage file? File is stored inside app/storage/app/uploads/ with the name song.mp3.
I tried in URL different approaches but no success: http://localhost:8000/storage/uploads/song.mp3 doesn't work.
filesystems.php
'links' => [
public_path('storage') => storage_path('app/public'),
],
If you want to access externally, you must place your files on app/public
@Snapey
I was following Google advice .
When using the local driver, all files that should be publicly accessible should be placed in the storage/app/public directory. Furthermore, you should create a symbolic link at public/storage which points to the storage/app/public directory.
@floreap thats what I said
You were storing in storage/app/uploads when it should be storage/app/public
@floreap did you succeed? I did the same, still 404.
As you have this:
'links' => [
public_path('storage') => storage_path('app/public'),
],
Move your file to
app/storage/app/public/uploads/song.mp3
And don't forget to run:
php artisan storage:link --force
To rebuild the symlink
Please sign in or create an account to participate in this conversation.