hskyzhou / aliyun-oss-flysystem
This is a Flysystem adapter for the Aliyun OSS ~2.2.1
1.7
2019-04-25 08:36 UTC
Requires
- php: >=5.5.9
- aliyuncs/oss-sdk-php: ~2.3.0
- league/flysystem: ~1.0
Requires (Dev)
- phpunit/phpunit: ~4.0
- satooshi/php-coveralls: ~1.0
README
This is a Flysystem Adapter for the AliCloud OSS ~1.2.1
Installation
composer require hskyzhou/aliyun-oss-flysystem
在config/filesystem.php中disk数组下增加配置
其中access_id,access_key,bucket,endpoint都是在阿里云中获取
'oss' => [ 'driver' => 'oss', 'access_id' => env('OSS_ACCESS_ID'), 'access_key' => env('OSS_ACCESS_KEY'), 'bucket' => env('OSS_BUCKET'), 'endpoint' => env('OSS_ENDPOINT'), 'prefix' => env('OSS_PREFIX'), // optional 'schema' => env('OSS_SCHEMA'), //确定访问是通过http或者https ],
在项目的.env配置中增加
OSS_ACCESS_ID= OSS_ACCESS_KEY= OSS_BUCKET= OSS_ENDPOINT= OSS_PREFIX= OSS_SCHEMA=http