Skip to content
Advertisement

Laravel storage link won’t work on production

I’m using storage_path to save my images and I symbolic my storage folder to public_html

JavaScript

On the local everything works fine, when I upload an image it will upload in storage folder and link of it will appear in public folder but since I moved to live host and production mode my images will upload in storage folder but nothing in my public_html/storage and I’m not able to get them in my front-end.

Codes

/config/filesystems.php

JavaScript

.env

JavaScript

controller sample

JavaScript

any idea?

Advertisement

Answer

SOLVED

Thanks for all your helps, I tried to run php artisan storage:link on my server and I found out that my server has disabled symlink for security reason.

So I have changed all my image uploading functions to upload images in my public folder instead of storage folder and now everything is working just fine.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement