An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

# Flysystem OBS


Build Status
Code Coverage
Latest Stable Version
Total Downloads
Latest Unstable Version
License

> **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).