ofcold / flysystem-ali_oss
Flysystem for Aliyun OSS.
1.0
2018-04-23 06:30 UTC
Requires
- php: ^7.1
- aliyuncs/oss-sdk-php: ^2.3
- league/flysystem: ^1.0
This package is auto-updated.
Last update: 2024-10-29 04:36:42 UTC
README
AliYun OSS Storage adapter for flysystem.
Installation
composer require ofcold/flysystem-ali_oss
Usage
- Laravel Or pyrocms
use League\Flysystem\Filesystem; use League\Flysystem\MountManager; use Illuminate\Filesystem\FilesystemManager; $driver = new Filesystem(new OssAdapter( new OssClient( 'key', 'secret', 'endpoint' ), 'bucket', 'endpoint', 'Your prefix' )); app(MountManager::class)->mountFilesystem($prefix, $driver); app(FilesystemManager::class)->extend( $this->disk->getSlug(), function () use ($driver) { return $driver; } );