ivanvermeyen / laravel-google-drive-demo

Laravel & Google Drive Storage - Demo project with Laravel 5.4
403 stars 155 forks source link

Missing required client configuration options: region(string) #83

Closed ProduceSinapsi closed 4 years ago

ProduceSinapsi commented 4 years ago

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

ivanvermeyen commented 4 years ago

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 ?

ProduceSinapsi commented 4 years ago

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.

ivanvermeyen commented 4 years ago

No problem, glad I could help 👍