huiwang / flysystem-oss
flysystem adapter for the aliyun oss storage
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/huiwang/flysystem-oss
Requires
- php: >=7.1
- aliyuncs/oss-sdk-php: ~2.0
- league/flysystem: ^1.0
Requires (Dev)
- mockery/mockery: ^1.3
- phpunit/phpunit: ~7
This package is auto-updated.
Last update: 2025-10-29 02:37:04 UTC
README
💾 Flysystem adapter for the aliyun oss storage
安装
composer require "huiwang/flysystem-oss" -vvv
使用
$accessKeyId = '';
$accessKeySecret = '';
$endpoint = '';
$bucket = '';
$client = new \OSS\OssClient($accessKeyId, $accessKeySecret, $endpoint);
$adapter = new \Huiwang\Flysystem\Oss\OssAdapter($client, $bucket);
$filesystem = new \League\Flysystem\Filesystem($adapter, ['disable_asserts' => true]);
$filesystem->addPlugin(new \Huiwang\Flysystem\Oss\Plugins\FileUrl());
$filesystem->addPlugin(new \Huiwang\Flysystem\Oss\Plugins\TemporaryUrl());