refactor: 七牛云上传
This commit is contained in:
19
extend/filesystem/driver/Qiniu.php
Normal file
19
extend/filesystem/driver/Qiniu.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace filesystem\driver;
|
||||
|
||||
use League\Flysystem\FilesystemAdapter;
|
||||
use Overtrue\Flysystem\Qiniu\QiniuAdapter;
|
||||
|
||||
class Qiniu extends \think\filesystem\Driver
|
||||
{
|
||||
protected function createAdapter(): FilesystemAdapter
|
||||
{
|
||||
return new QiniuAdapter(
|
||||
$this->config['access_key'],
|
||||
$this->config['secret_key'],
|
||||
$this->config['bucket'],
|
||||
$this->config['base_url'],
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user