hskyzhou/aliyun-oss-flysystem

This is a Flysystem adapter for the Aliyun OSS ~2.2.1

1.7 2019-04-25 08:36 UTC

This package is auto-updated.

Last update: 2024-11-25 22:18:38 UTC


README

Build Status Coverage Status

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