Skip to content

JimChenWYU/flysystem-aliyun-oss

Repository files navigation

JimChen\Flysystem\AliyunOss

Author Build Status Coverage Status Quality Score Software License Packagist Version

This is a Flysystem adapter for the Aliyun Oss SDK v2.*

Requirement

  • PHP >= 5.5.9
  • Composer
  • Openssl Extension
  • cURL Extension

Installing

$ composer require jimchen/flysystem-aliyun-oss -vvv

Usage

<?php
use OSS\OssClient;
use League\Flysystem\Filesystem;
use JimChen\Flysystem\AliyunOss\AliyunOssAdapter;

include __DIR__ . '/vendor/autoload.php';

$client = new OssClient([
    'your-access-key-id',
    'your-access-key-secret',
    'your-bucket-name',
    'your-endpoint'
]);

$adapter = new AliyunOssAdapter($client, 'your-bucket-name');
$filesystem = new Filesystem($adapter);

License

MIT