gexingw / laravel-qingstor-storage
v0.0.4
2018-01-08 06:24 UTC
Requires
- php: >=5.5.9
- league/flysystem: ^1.0
- yunify/qingstor-sdk: ^2.2
This package is not auto-updated.
Last update: 2025-04-12 06:01:33 UTC
README
关于
Laravel QingStor 文件上传系统,基于青云官方SDK。 推荐使用laravel-upload-manager进行整合。
安装
- Composer 安装
composer require gexingw/laravel-qingstor-storage
- 下载安装,下载解压缩即可
配置
-
配置青云的API Key和Secret
// 在config/filesystems.php disks数组添加如下代码 'qingstor' => [ 'driver' => 'QingStor', 'bucket' => 'My Bucket', 'zone' => 'My Zone', 'access_key_id' => 'Access ID', // 青云App Key 'secret_access_key' => 'Access Secret', //青云App Secret ],
用法
- 简单用法
- 设置为默认上传策略
将 config/filesystems.php default 值改为 "qingstor"
\Storage::put($path, $content);
- 自定义上传策略
\Storage::disk('qingstor')->put($path, $content);
- 设置为默认上传策略
将 config/filesystems.php default 值改为 "qingstor"
- 更多用法请参考 Laravel官方文档