iamcavic's avatar

Laravel storage:link only works only once

I am having a wired issue, when I upload files using public driver they are stored correctly to storage/public/folder

Now when I run php artisan storage:link

That creates the link in my public folder so I can access my resources.

However when I upload new file it is not reflected in the public folder only in my storage folder

Eg

public -> storage link (no change)

storage->public (works fine)

if I delete the link and create new one again all the files are reflected correctly but it is not dynamic.

Thank you

0 likes
2 replies
Snapey's avatar

The symlink is to storage/app/public not storage/public

You need to write your files to the app/public folder instead. They will then appear to be in public/storage

Alternatively you can change the config/filesystem.php to put files where you want them

Please or to participate in this conversation.