2020-11-07 22:57:10 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
|
|
* This file is part of Hyperf.
|
|
|
|
*
|
|
|
|
* @link https://www.hyperf.io
|
|
|
|
* @document https://hyperf.wiki
|
|
|
|
* @contact group@hyperf.io
|
|
|
|
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
|
|
|
*/
|
|
|
|
return [
|
|
|
|
'default' => 'local',
|
|
|
|
'storage' => [
|
2021-06-30 19:27:49 +08:00
|
|
|
'local' => [
|
2020-11-07 22:57:10 +08:00
|
|
|
'driver' => \Hyperf\Filesystem\Adapter\LocalAdapterFactory::class,
|
2021-06-30 19:27:49 +08:00
|
|
|
'root' => env('UPLOAD_PATH', __DIR__ . '/../../runtime'),
|
2020-11-07 22:57:10 +08:00
|
|
|
],
|
2021-06-30 19:27:49 +08:00
|
|
|
'ftp' => [
|
|
|
|
'driver' => \Hyperf\Filesystem\Adapter\FtpAdapterFactory::class,
|
|
|
|
'host' => 'ftp.example.com',
|
2020-11-07 22:57:10 +08:00
|
|
|
'username' => 'username',
|
|
|
|
'password' => 'password',
|
|
|
|
// 'port' => 21,
|
|
|
|
// 'root' => '/path/to/root',
|
|
|
|
// 'passive' => true,
|
|
|
|
// 'ssl' => true,
|
|
|
|
// 'timeout' => 30,
|
|
|
|
// 'ignorePassiveAddress' => false,
|
|
|
|
],
|
|
|
|
'memory' => [
|
|
|
|
'driver' => \Hyperf\Filesystem\Adapter\MemoryAdapterFactory::class,
|
|
|
|
],
|
2021-06-30 19:27:49 +08:00
|
|
|
's3' => [
|
|
|
|
'driver' => \Hyperf\Filesystem\Adapter\S3AdapterFactory::class,
|
|
|
|
'credentials' => [
|
|
|
|
'key' => env('S3_KEY'),
|
2020-11-07 22:57:10 +08:00
|
|
|
'secret' => env('S3_SECRET'),
|
|
|
|
],
|
2021-06-30 19:27:49 +08:00
|
|
|
'region' => env('S3_REGION'),
|
|
|
|
'version' => 'latest',
|
|
|
|
'bucket_endpoint' => false,
|
2020-11-07 22:57:10 +08:00
|
|
|
'use_path_style_endpoint' => false,
|
2021-06-30 19:27:49 +08:00
|
|
|
'endpoint' => env('S3_ENDPOINT'),
|
|
|
|
'bucket_name' => env('S3_BUCKET'),
|
2020-11-07 22:57:10 +08:00
|
|
|
],
|
2021-06-30 19:27:49 +08:00
|
|
|
'minio' => [
|
|
|
|
'driver' => \Hyperf\Filesystem\Adapter\S3AdapterFactory::class,
|
|
|
|
'credentials' => [
|
|
|
|
'key' => env('S3_KEY'),
|
2020-11-07 22:57:10 +08:00
|
|
|
'secret' => env('S3_SECRET'),
|
|
|
|
],
|
2021-06-30 19:27:49 +08:00
|
|
|
'region' => env('S3_REGION'),
|
|
|
|
'version' => 'latest',
|
|
|
|
'bucket_endpoint' => false,
|
2020-11-07 22:57:10 +08:00
|
|
|
'use_path_style_endpoint' => true,
|
2021-06-30 19:27:49 +08:00
|
|
|
'endpoint' => env('S3_ENDPOINT'),
|
|
|
|
'bucket_name' => env('S3_BUCKET'),
|
2020-11-07 22:57:10 +08:00
|
|
|
],
|
2021-06-30 19:27:49 +08:00
|
|
|
'oss' => [
|
|
|
|
'driver' => \Hyperf\Filesystem\Adapter\AliyunOssAdapterFactory::class,
|
|
|
|
'accessId' => env('OSS_ACCESS_ID'),
|
2020-11-07 22:57:10 +08:00
|
|
|
'accessSecret' => env('OSS_ACCESS_SECRET'),
|
2021-06-30 19:27:49 +08:00
|
|
|
'bucket' => env('OSS_BUCKET'),
|
|
|
|
'endpoint' => env('OSS_ENDPOINT'),
|
2020-11-07 22:57:10 +08:00
|
|
|
// 'timeout' => 3600,
|
|
|
|
// 'connectTimeout' => 10,
|
|
|
|
// 'isCName' => false,
|
|
|
|
// 'token' => '',
|
|
|
|
],
|
2021-06-30 19:27:49 +08:00
|
|
|
'qiniu' => [
|
|
|
|
'driver' => \Hyperf\Filesystem\Adapter\QiniuAdapterFactory::class,
|
2020-11-07 22:57:10 +08:00
|
|
|
'accessKey' => env('QINIU_ACCESS_KEY'),
|
|
|
|
'secretKey' => env('QINIU_SECRET_KEY'),
|
2021-06-30 19:27:49 +08:00
|
|
|
'bucket' => env('QINIU_BUCKET'),
|
|
|
|
'domain' => env('QINBIU_DOMAIN'),
|
2020-11-07 22:57:10 +08:00
|
|
|
],
|
2021-06-30 19:27:49 +08:00
|
|
|
'cos' => [
|
|
|
|
'driver' => \Hyperf\Filesystem\Adapter\CosAdapterFactory::class,
|
|
|
|
'region' => env('COS_REGION'),
|
|
|
|
'credentials' => [
|
|
|
|
'appId' => env('COS_APPID'),
|
|
|
|
'secretId' => env('COS_SECRET_ID'),
|
2020-11-07 22:57:10 +08:00
|
|
|
'secretKey' => env('COS_SECRET_KEY'),
|
|
|
|
],
|
2021-06-30 19:27:49 +08:00
|
|
|
'bucket' => env('COS_BUCKET'),
|
2020-11-07 22:57:10 +08:00
|
|
|
'read_from_cdn' => false,
|
|
|
|
// 'timeout' => 60,
|
|
|
|
// 'connect_timeout' => 60,
|
|
|
|
// 'cdn' => '',
|
|
|
|
// 'scheme' => 'https',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
];
|