ehsanquddusi's avatar

Issue with laravel file uploads on local storage

I am using $request->file('photo')->store('public/photos'); to store files in public/photos directory under storage. Created a link to storage from public directory using artisan storage:link. The output of $request->file('photo')->store('public/photos'); is stored in db against the photo field. While retrieving the photo in view, I use asset() helper which output the link as domain.com/storage/public/photos/photo.jpg which returns 404 error. It should actually return domain.com/storage/photos/photo.jpg as public/storage is linked to app/storage/public. Please help.

0 likes
3 replies

Please or to participate in this conversation.