Category : google-drive-api

I have installed composer require nao-pon/flysystem-google-drive:~1.1 on my project’s root. I have also added this on my filesystems.php ‘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’), ] Moreover, in my .env GOOGLE_DRIVE_CLIENT_ID=xxx.apps.googleusercontent.com GOOGLE_DRIVE_CLIENT_SECRET=xxx GOOGLE_DRIVE_REFRESH_TOKEN=xxx GOOGLE_DRIVE_FOLDER_ID=null And finally, in my app.php AppProvidersGoogleDriveServiceProvider::class, And even though I ..

Read more

I am new to GoogleAPIs and Laravel, I run a PHP web application on Laravel 8 in a virtual Linux environment. Socialite and Drive API was working fine and out of sudden it doesn’t work anymore and always return connection refused error after long period of loading as follows: GuzzleHttpExceptionConnectException Connection refused for URI https://www.googleapis.com/oauth2/v4/token ..

Read more

I did the code below and I tried to use ‘parents’ to share a file to a specific folder, but it didn’t work. I looked everywhere for a solution, but I can’t find any. function grantPermission($role, $user, $atividade){ $userPermission = new Google_Service_Drive_Permission(array( ‘type’ => ‘user’, ‘role’ => $role, ’emailAddress’ => $user->email, ‘parents’ => array($user->folder_id_minhas_atividades), )); ..

Read more

I am using GoogleDrive as my filesystem for Laravel(using this package). In the tutorial, to add an image there they do it like this: $request->file(‘userimg’)->store(‘1wbJ21pzL0XZwQBVe0hqbbDhbqoUCc2Eo’, ‘google’); A string with a set of characters, this is the ID of a folder in Google Drive, google – probably it means that google is used as the file ..

Read more

Following these instructions exactly, I get the following error: refresh token must be passed in or set as part of setAccessToken Code from GoogleDriveServiceProvider: class GoogleDriveServiceProvider extends ServiceProvider { /** * Bootstrap the application services. * * @return void */ public function boot() { Storage::extend(‘google’, function($app, $config) { $client = new Google_Client(); $client->setClientId($config[‘clientId’]); $client->setClientSecret($config[‘clientSecret’]); $client->setAccessType(‘offline’); ..

Read more

I am using this package to work with Google Drive api using Laravel. However, when installing the package, a bunch of similar errors appear: Class Google_Service_Adsense_AdClientAdCode located in D:/OpenServer/domains/Laravel_store/vendor/google/apiclient-services/srcGoogleServiceAdSenseAdClientAdCode.php does not comply with psr-0 autoloading standard. Skipping. For a complete list, see here. It is indicated here that the error is associated with autoloading according ..

Read more

In my Laravel project, I use the Google Drive API, through the composer I installed the package to work with it. Now I am trying to upload an update to the hosting, but the error that I described in this question comes out. I found information on what needs to be added to composer.json in ..

Read more

I am using google drive api with laravel for a continuous backup, so I am using following packages "nao-pon/flysystem-google-drive": "~1.1", and "spatie/laravel-backup": "^6.14" I have set up google drive api v3 with refresh token and put it into .env FILESYSTEM_CLOUD=google GOOGLE_DRIVE_CLIENT_ID=****.apps.googleusercontent.com GOOGLE_DRIVE_CLIENT_SECRET=**** GOOGLE_DRIVE_REFRESH_TOKEN=**** GOOGLE_DRIVE_FOLDER_ID=**** so everything works properly, and I can use google drive as ..

Read more

I’m trying to copy a folder with some images inside to my google drive. I’ve setup the installation using nao-pon/flysystem-google-drive. The below code works: Route::get(‘/backup’,function(){ Storage::disk(‘google’)->put(‘hello.txt’,’hello world’); }); I get a txt file on my google drive but how do i apply it for a folder with images. My folder structure looks like this: storage/app/public/gallery ..

Read more