Anyone else had this issue:
I set my filesystems.php config defualt
from local
to cloud
(which is set to my s3) and I get this error with my storage code:
$path = $request->file('avatar')->store('avatars');
-> in my UserController
Error : Driver [] is not supported.
If I leave the filesystems config to stock and just run this code the image uploads to my s3 fine
$path = $request->file('avatar')->store('avatars', 's3');
-> in my UserController
shouldnt $path = $request->file('avatar')->store('avatars');
run to what ever the default is without passing the specific driver? I tried 'default' => 's3',
and that gets the same error
CONFIG DRIVERS
'default' => 'local',
'cloud' => 's3',
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => env('AWS_KEY'),
'secret' => env('AWS_SECRET'),
'region' => env('AWS_REGION'),
'bucket' => env('AWS_BUCKET'),
],
],
I guess, that whether your example with manually typing a storage to the store() function works well, you can have a problem with storage config. Could you, please, show your configuration file with storage types?