hyperf / flysystem-oss
Fund package maintenance!
Open Collective
hyperf.wiki/#/zh-cn/donate
Installs: 336 746
Dependents: 17
Suggesters: 1
Security: 0
Stars: 6
Watchers: 4
Forks: 6
Open Issues: 1
Requires
- php: >=8.1
- aliyuncs/oss-sdk-php: ^2.4
- hyperf/support: ^3.1
- jetbrains/phpstorm-attributes: ^1.0
- league/flysystem: ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- hyperf/codec: ^3.1
- hyperf/context: ^3.1
- hyperf/di: ^3.1
- mockery/mockery: ^1.0
- phpstan/phpstan: ^1.0
- phpunit/phpunit: >=7.0
- swoole/ide-helper: dev-master
- swow/swow: dev-develop
- symfony/var-dumper: ^5.1
README
composer require hyperf/flysystem-oss
鸣谢
借鉴了 xxtime/flysystem-aliyun-oss 部分代码,在此表示感谢。
使用
<?php $adapter = new Adapter([ 'accessId' => env('OSS_ACCESS_ID'), 'accessSecret' => env('OSS_ACCESS_SECRET'), 'bucket' => env('OSS_BUCKET'), 'endpoint' => env('OSS_ENDPOINT'), 'timeout' => 3600, 'connectTimeout' => 10, 'isCName' => false, 'token' => null, 'proxy' => null, ]); $flysystem = new Filesystem($adapter); $flysystem->write('test.json', Json::encode(['id' => uniqid()]));