After making a simple link for laravel storage and uploading files. my files can successfully put into storage/app/public directory and when i try to show image such as this link:
https://next.my-site.in/storage/38/0bfc02b202f084e57012988db4671fae.png
laravel could't find that and i get 404 error, but this link work fine:
https://next.my-site.in/storage/app/public/38/0bfc02b202f084e57012988db4671fae.png
creating storage link command result:
[my-site@cpsrv next]$ php artisan storage:link
INFO The [public/storage] link has been connected to [storage/app/public].
BTW, laravel installed in subdomain
storage link in public folder:
lrwxrwxrwx 1 my-site my-site 47 Sep 16 14:48 storage -> /home/my-site/public_html/next/storage/app/public
filesystem.php contains:
<?php
return [
'default' => env('FILESYSTEM_DISK', 'local'),
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'throw' => false,
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
'throw' => false,
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
],
],
'links' => [
public_path('storage') => storage_path('app/public'),
],
];