Laravel 使用腾讯云 cos 存储对象

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 协议》,转载必须注明作者和本文链接
不要轻易放弃。学习成长的路上,我们长路漫漫,只因学无止境 Don't give up easily. On the way of learning and growing up, we have a long way to go, just because there is no end to learning.
本帖由系统于 6年前 自动加精
《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
讨论数量: 4
xingchen

good!

7年前 评论

然后呢??

6年前 评论

希望能继续出一些如何使用的教程

6年前 评论

Your requirements could not be resolved to an installable set of packages.

5年前 评论
唐长老网络 5年前
Z_xguaa (作者) 5年前
唐长老网络 5年前

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!