crehler/flysystem-ovh

Flysystem adapter for OVH

This package's canonical repository appears to be gone and the package has been frozen as a result.

1.0.3 2019-07-10 08:16 UTC

This package is auto-updated.

Last update: 2022-01-10 13:43:30 UTC


README

Software License

Installation

composer require crehler/flysystem-ovh

Usage

See configuration section for credential details.

use Crehler\Flysystem\OvhObjectStorage;
use Crehler\Flysystem\OvhObjectStorageAdapter as Adapter;
use League\Flysystem\Filesystem;

$client = new OvhObjectStorage([
   'username'  => ':username',
   'password'  => ':password',
   'tenantId'  => ':tenantId',
]);

$store = $client->objectStoreService('swift', 'SBG1');
$container = $store->getContainer('flysystem');

$filesystem = new Filesystem(new Adapter($container));

Alternatively:

use Crehler\Flysystem\OvhObjectStorage;
use Crehler\Flysystem\OvhObjectStorageAdapter as Adapter;
use Crehler\Flysystem\Filesystem;

$options = [
    'username'  => ':username',
    'password'  => ':password',
    'tenantId'  => ':tenantId',
    'container' => 'flysystem',
    'region'    => 'SBG1',
];

$client = new OvhObjectStorage($options);

$filesystem = new Filesystem(new Adapter($client->getContainer()));

Based on https://github.com/engineor/flysystem-runabove