1、
composer require freyo/flysystem-qcloud-cos-v5
2、在config/app.php的providers下新增
Freyo\Flysystem\QcloudCOSv5\ServiceProvider::class,
3、在app/filesystems.php中的disks裡下新增
'disks'=>[
// ...
'cosv5' => [
'driver' => 'cosv5',
'region' => env('COSV5_REGION', 'ap-guangzhou'),
'credentials' => [
'appId' => env('COSV5_APP_ID'),
'secretId' => env('COSV5_SECRET_ID'),
'secretKey' => env('COSV5_SECRET_KEY'),
],
'timeout' => env('COSV5_TIMEOUT', 60),
'connect_timeout' => env('COSV5_CONNECT_TIMEOUT', 60),
'bucket' => env('COSV5_BUCKET'),
'cdn' => env('COSV5_CDN'),
'scheme' => env('COSV5_SCHEME', 'https'),
],
],
4、在app/filesystems.php修改
'default' => 'cosv5',
騰訊雲COS物件儲存 V5: https://github.com/xiaoxuan6/flysystem-qcl...
騰訊雲COS物件儲存 V4: https://github.com/xiaoxuan6/flysystem-qcl...
騰訊雲COS物件儲存 V3: https://github.com/xiaoxuan6/flysystem-qcl...
部落格地址:http://blog.jstm365.com/
本作品採用《CC 協議》,轉載必須註明作者和本文連結