WebbieWorks's avatar

After uploading to server, uploaded image dont show

I do not understand why it is so complicated to get uploaded images to the right path.

I am using Laravel 6.5.2 and Voyager. I clicked on the "fix symlink" and it did not help.

What I have tried that has not fixed the issue:

created and ran php file with

<?php
symlink('/home/sendmailer/ValiantVoyager/public/storage', '/home/sendmailer/public_html/storage');

Changed in config/filesystem.php

'public' => [ 'driver' => 'local', 'root' => public_path('app/public'), 'url' => env('APP_URL').'/storage', 'visibility' => 'public', ],

I do not know why this is not working right.

0 likes
3 replies
thdebay's avatar

Did you use php artisan storage:link to link the storage folder?

Sinnbeck's avatar

@laxsmi I think the issue is that it is shared hosting, meaning that won't work

Sorry no great advice for shared hosting except, don't use it for laravel :)

WebbieWorks's avatar

SOLVED: Had to edit the filesystems.php code. Changed

'voyager' => [
        'driver' => 'local',
        'root' => storage_path('app/public'),// change here something specific to your application need
        'url' => env('APP_URL').'/storage',
        'visibility' => 'public',
        ],

to

'voyager' => [
        'driver' => 'local',
        'root' => storage_path('/storage'),// change here something specific to your application need
        'url' => env('APP_URL').'/storage',
        'visibility' => 'public',
        ],

Please or to participate in this conversation.