nillegal's avatar

Fetching files with custom disk not working

Hello everyone , I am using Spatie's Media Library and I actually have a custom disk for storing post thumbnails :

        'postThumbnail' => [
            'driver' => 'local',
            'root' => storage_path('app/public/postthumbnails'),
            'url' => env('APP_URL').'/custom',
            'visibility' => 'public',
            'throw' => false
        ],

I already run php artisan storage:link and everything is still fine : after uploading any image, i can have the full correct file URL https://mydomain.com/custom/{id}/{filename}. But i just found out I cannot access it so i couldn't even show it in a view. However, I can access it with https://mydomain.com/postthumbnails/{id}/{filename} which looks like the symlink stopped at a certain level (maybe at STORAGE only) so i always have to mention the real folder name: making the URL parameter useless.

Just wanted to ask if what did I do wrong or is there something else I miss? Thank you so much

0 likes
0 replies

Please or to participate in this conversation.