https://github.com/zingimmick/flysystem-obs
OBS filesystem adapter for Flysystem
https://github.com/zingimmick/flysystem-obs
filesystem flysystem obs
Last synced: 4 months ago
JSON representation
OBS filesystem adapter for Flysystem
- Host: GitHub
- URL: https://github.com/zingimmick/flysystem-obs
- Owner: zingimmick
- License: mit
- Created: 2021-05-27T09:03:09.000Z (about 4 years ago)
- Default Branch: 3.x
- Last Pushed: 2024-04-11T12:32:15.000Z (over 1 year ago)
- Last Synced: 2024-04-11T14:15:24.904Z (over 1 year ago)
- Topics: filesystem, flysystem, obs
- Language: PHP
- Homepage:
- Size: 267 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Flysystem OBS
> **Requires**
> - **[PHP 8.0+](https://php.net/releases/)**
> - **[Flysystem 3.10+](https://github.com/thephpleague/flysystem/releases)**## Version Information
| Version | Flysystem | PHP Version | Status |
|:--------|:----------|:------------|:------------------------|
| 3.x | 3.10+ | >= 8.0 | Active support :rocket: |
| 2.x | 2.x - 3.x | >= 7.2 | Active support |
| 1.x | 1.x | >= 7.2 | Active support |Require Flysystem OBS using [Composer](https://getcomposer.org):
```bash
composer require zing/flysystem-obs
```## Usage
```php
use League\Flysystem\Filesystem;
use Obs\ObsClient;
use Zing\Flysystem\Obs\ObsAdapter;$prefix = '';
$config = [
'key' => 'aW52YWxpZC1rZXk=',
'secret' => 'aW52YWxpZC1zZWNyZXQ=',
'bucket' => 'test',
'endpoint' => 'obs.cn-east-3.myhuaweicloud.com',
];$config['options'] = [
'url' => '',
'endpoint' => $config['endpoint'],
'bucket_endpoint' => '',
'temporary_url' => '',
];$client = new ObsClient($config);
$adapter = new ObsAdapter($client, $config['bucket'], $prefix, null, null, $config['options']);
$flysystem = new Filesystem($adapter);
```## Integration
- Laravel: [zing/laravel-flysystem-obs](https://github.com/zingimmick/laravel-flysystem-obs)
## Reference
[league/flysystem-aws-s3-v3](https://github.com/thephpleague/flysystem-aws-s3-v3)
## License
Flysystem OBS is an open-sourced software licensed under the [MIT license](LICENSE).