Skip to content
Advertisement

Show this error “Undefined index: thumbnail” when add filesystem in laravel

When I add new public directory in Filesystem Disks in filesystems.php like below

JavaScript

And in my Controller I want to save an image into thumbnail directory like below

JavaScript

But it shows me the error Undefined index: thumbnail. I don’t know why this error shows me. Any help appreciate

Advertisement

Answer

Change 'visibility' => 'thumbnail', to 'visibility' => 'public',

https://laravel.com/docs/8.x/filesystem#file-visibility

it can be public or private other then you can not set anything as per doc

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