sebastiankennedy / laravel-flysystem-ali-cloud-oss
Package description here.
0.0.3
2018-09-10 08:58 UTC
Requires
- aliyuncs/oss-sdk-php: ^2.3
- league/flysystem: ^1.0
- mockery/mockery: ^1.1
- phpunit/phpunit: ~5
This package is auto-updated.
Last update: 2025-01-04 10:55:18 UTC
README
🔌 一个针对阿里云 OSS 的 Laravel Flysystem Adapter
要求 - Requirement
- PHP >= 7.0
- Laravel >= 5.5
安装 - Installing
$ composer require sebastiankennedy/laravel-flysystem-ali-cloud-oss -vvv
使用 - Usage
1.env
ALI_CLOUD_OSS_ACCESS_KEY_ID=accessKeyId ALI_CLOUD_OSS_ACCESS_KEY_SECRET=accessKeySecret ALI_CLOUD_OSS_ENDPOINT=endpoint ALI_CLOUD_OSS_BUCKET=bucket
2 filesystem.php
<?php ... 'disks' => [ 'ali_cloud_oss' => [ 'driver' => 'ali_cloud_oss', 'access_key_id' => env('ALI_CLOUD_OSS_ACCESS_KEY_ID'), 'access_key_secret' => env('ALI_CLOUD_OSS_ACCESS_KEY_SECRET'), 'endpoint' => env('ALI_CLOUD_OSS_ENDPOINT'), 'bucket' => env('ALI_CLOUD_OSS_BUCKET'), ], ], ...
3 API
<?php ... $storage = \Storage->disk('ali_cloud_oss'); // 上传文件 $storage->uploadFile($object, $path); ...
License
MIT