2017 © Pedro Peláez
 

yii2-extension yii2-flysystem-google-drive

Flysystem Google Drive filesystem for Yii2

image

la-haute-societe/yii2-flysystem-google-drive

Flysystem Google Drive filesystem for Yii2

  • Wednesday, October 25, 2017
  • by juban
  • Repository
  • 5 Watchers
  • 4 Stars
  • 127 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 2 Versions
  • 9 % Grown

The README.md

Yii2 Flysystem Google Drive

Flysystem Google Drive filesystem for Yii2, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

composer require --prefer-dist la-haute-societe/yii2-flysystem-google-drive "^1.0.0"

or add, (*4)

"la-haute-societe/yii2-flysystem-google-drive": "^1.0.0"

to the require section of your composer.json file., (*5)

Usage

This extension is a Google Drive Filesystem for Yii2 Flysystem extension by @creocoder., (*6)

It uses the Flysystem Adapter for Google Drive by @nao-pon, (*7)

For usage instructions, see Yii2 Flysystem documentation, (*8)

You can get help on how to get clientID, clientSecret and refreshToken here (Thx @ivanvermeyen), (*9)

Configuration

Local filesystem

Configure application components as follows, (*10)

return [
    //...
    'components' => [
        //...
        'googleDrive' => [
            'class' =>  lhs\Yii2FlysystemGoogleDrive\GoogleDriveFilesystem::class,
            'clientId'     => 'xxx YOUR CLIENT ID xxx',
            'clientSecret' => 'xxx YOUR CLIENT SECRET xxx',
            'refreshToken' => 'xxx YOUR REFRESH TOKEN xxx',
//             'driveId'     => 'xxx YOUR TEAM DRIVE ID xxx',
            // 'rootFolderId' => 'xxx ROOT FOLDER ID xxx'
        ],
    ],
];

You can then access the flysystem API like:, (*11)

$contents = Yii::$app->googleDrive->listContents();
...

The Versions

25/10 2017

dev-master

9999999-dev

Flysystem Google Drive filesystem for Yii2

  Sources   Download

MIT

The Requires

 

by Alban Jubert

file filesystem extension yii2 google flysystem drive

25/10 2017

1.0.0

1.0.0.0

Flysystem Google Drive filesystem for Yii2

  Sources   Download

MIT

The Requires

 

by Alban Jubert

file filesystem extension yii2 google flysystem drive