whereof/think-filesystem-driver

oss cos qiniu sftp driver for think-filesystem

1.0.1 2021-11-28 04:31 UTC

This package is auto-updated.

Last update: 2022-01-28 04:52:01 UTC


README

composer require whereof/think-filesystem-driver

阿里云OSS

安装驱动 composer require xxtime/flysystem-aliyun-oss ^1.5

'oss' => [
    'type'         => \whereof\think\filesystem\Oss::class,
    'credentials'=>[//若为false,则使用函数计算 runtime context提供的 credentials
        'accessId'     => '******',
        'accessSecret' => '******',
    ],
    'bucket'       => 'bucket',
    'endpoint'     => 'oss-cn-hangzhou.aliyuncs.com',
    'url'          => 'oss.domain.com'
],

腾讯COS

安装驱动 composer require overtrue/flysystem-cos ^2.1

'cos' => [
    'type'            => \whereof\think\filesystem\Cos::class ,
    'region'          => '***', //bucket 所属区域 英文
    'appId'           => '***', // 域名中数字部分
    'secretId'        => '***',
    'secretKey'       => '***',
    'bucket'          => '***',
    'timeout'         => 60,
    'connect_timeout' => 60,
    'cdn'             => '您的 CDN 域名',
    'scheme'          => 'https',
    'read_from_cdn'   => false,
    'domain'       => 'oss.domain.com',//访问域名
],

七牛云

安装驱动 composer require overtrue/flysystem-qiniu ^1.0

'qiniu' => [
    'type'            => \whereof\think\filesystem\Qiniu::class ,
    'accessKey' => '******',
    'secretKey' => '******',
    'bucket'    => 'bucket',
    'domain'       => 'oss.domain.com',//不要斜杠结尾,URL地址域名
],

SFTP

安装驱动 composer require league/flysystem-sftp ^1.0

'sftp' => [
    'type'     => \whereof\think\filesystem\Sftp::class,
    'host'     => '127.0.0.1',
    'port'     => 22,
    'username' => 'root',
    'password' => '123456',
    'root'     => '/home/sftp',
    'timeout'  => 10,
],

FTP

'ftp' => [
  'type'     => \whereof\think\filesystem\Ftp::class,
  'host' => 'ftp.example.com',
  'username' => 'username',
  'password' => 'password',
  'root' => '/path/to/root',
],

GitHub

安装驱动 composer require whereof/flysystem-github ^1.0

'sftp' => [
    'type'     => \whereof\think\filesystem\Github::class,
    'token'     => 'token',
    'username'     => 'username',
    'repository'     => 'repository',
],