nimbusoft/flysystem-openstack-swift

Flysystem adapter for OpenStack Swift

0.2.1 2018-02-15 09:27 UTC

README

Author Build Status Software License Packagist Version Total Downloads

Flysystem adapter for OpenStack Swift.

Installation

composer require nimbusoft/flysystem-openstack-swift

Usage

$openstack = new OpenStack\OpenStack([
    'authUrl' => '{authUrl}',
    'region'  => '{region}',
    'user'    => [
        'id'       => '{userId}',
        'password' => '{password}'
    ],
    'scope'   => ['project' => ['id' => '{projectId}']]
]);

$container = $openstack->objectStoreV1()
    ->getContainer('{containerName}');

$adapter = new Nimbusoft\Flysystem\OpenStack\SwiftAdapter($container);

$flysystem = new League\Flysystem\Filesystem($adapter);