https://github.com/hyperf/flysystem-oss
Aliyun OSS Adapter for Flysystem v2.0
https://github.com/hyperf/flysystem-oss
Last synced: 6 months ago
JSON representation
Aliyun OSS Adapter for Flysystem v2.0
- Host: GitHub
- URL: https://github.com/hyperf/flysystem-oss
- Owner: hyperf
- License: mit
- Created: 2021-07-06T14:52:07.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-06T02:16:24.000Z (over 1 year ago)
- Last Synced: 2025-06-30T20:16:57.857Z (7 months ago)
- Language: PHP
- Size: 30.3 KB
- Stars: 6
- Watchers: 3
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OSS Adapter for Flysystem
```
composer require hyperf/flysystem-oss
```
## 鸣谢
借鉴了 [xxtime/flysystem-aliyun-oss](https://github.com/xxtime/flysystem-aliyun-oss) 部分代码,在此表示感谢。
## 使用
```php
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()]));
```