huang-yi / flysystem-aliyun-oss
Flysystem adapter for the Aliyun OSS
0.1.2
2019-06-28 06:58 UTC
Requires
- php: ^7.0
- huang-yi/aliyun-oss: 0.1.*
- league/flysystem: ^1.0
This package is auto-updated.
Last update: 2024-11-28 19:11:38 UTC
README
This package provides a Flysystem adapter for the Aliyun OSS.
Usage
<?php require __DIR__ . '/vendor/autoload.php'; use HuangYi\AliyunOss\OssClient; use HuangYi\FlysystemAliyunOss\AliyunOssAdapter; use League\Flysystem\Filesystem; $bucketName = 'bucket'; $endpoint = 'oss-cn-hangzhou.aliyuncs.com'; $accessKeyId = 'access_key_id'; $accessKeySecret = 'access_key_secret'; $client = new OssClient($bucketName, $endpoint, $accessKeyId, $accessKeySecret); $adapter = new AliyunOssAdapter($client); $filesystem = new Filesystem($adapter);