ivanvermeyen/laravel-google-drive-demo

Missing required client configuration options: region(string)

ProduceSinapsi opened this issue · 3 comments

When I call

$contents = collect(Storage::cloud()->listContents($client_id, $recursive))

on local environment everything works properly.

I deploy my application on heroku and when I call the requested endpoint an error message is displayed:

Missing required client configuration options:

region: (string)

A "region" configuration value is required for the "s3" service
(e.g., "us-west-2"). A list of available public regions and endpoints can be
found at http://docs.aws.amazon.com/general/latest/gr/rande.html.

My filesystem.php config files is configure as follow:

'google' => [ 'driver' => 'google', 'clientId' => env('GOOGLE_DRIVE_CLIENT_ID'), 'clientSecret' => env('GOOGLE_DRIVE_CLIENT_SECRET'), 'refreshToken' => env('GOOGLE_DRIVE_REFRESH_TOKEN'), 'folderId' => env('GOOGLE_DRIVE_FOLDER_ID'), 'region' => 'eu-central-1' ],

Can you give me some help with this? Available if you need more info.

Thanks

That would mean that your app is still using the S3 driver and not the google driver.
Probably an issue with env/filesystems settings or config caching ?

Yes, just double-checked env variables on Heroku and I have found a missing FILESYSTEM_CLOUD.

Thank you for the repo, it is extremely useful.

My apologies for this no-issue.

No problem, glad I could help 👍