定制 la-haute-societe/yii2-flysystem-google-drive 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

最新稳定版本:1.1.0

Composer 安装命令:

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

包简介

Flysystem Google Drive filesystem for Yii2

README 文档

README

Flysystem Google Drive filesystem for Yii2

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

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

to the require section of your composer.json file.

Usage

This extension is a Google Drive Filesystem for Yii2 Flysystem extension by @creocoder.

It uses the Flysystem Adapter for Google Drive by @nao-pon

For usage instructions, see Yii2 Flysystem documentation

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

Configuration

Local filesystem

Configure application components as follows

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:

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

统计信息

  • 总下载量: 22.9k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 5
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-10-25