xtrcode / laravel-ovh-openstack-swift
OVH Object & Block Storage driver for Laravel/Lumen for Laravel >=5.*
Requires
- illuminate/filesystem: ^5.1|^6.0
- illuminate/support: ^5.1|^6.0
- league/flysystem: ^1.0
- mzur/flysystem-openstack-swift: ^1.0
- php-opencloud/openstack: ^3.0
README
OVH Object & Block Storage driver for Laravel/Lumen.
Installation
Require the package with Composer:
composer require xtrcode/laravel-ovh-openstack-swift
Laravel
For Laravel 5.4 and lower, add the service provider to config/app.php
:
Xtrcode\Filesystem\SwiftServiceProvider::class,
Lumen
Add the service provider to bootstrap/app.php
:
$app->register(Xtrcode\Filesystem\SwiftServiceProvider::class);
Configuration
Add a new storage disk to config/filesystems.php
(using v2 of the identity API):
'disks' => [ 'ovh' => [ 'driver' => 'swift', 'authUrl' => env('OS_AUTH_URL', ''), 'region' => env('OS_REGION_NAME', ''), 'user' => env('OS_USERNAME', ''), 'domain' => env('OS_USER_DOMAIN_NAME', 'default'), 'password' => env('OS_PASSWORD', ''), 'container' => env('OS_CONTAINER_NAME', ''), 'tenantName' => env('OS_TENANT_NAME', ''), ], ]
Additional configuration options:
-
projectId
(default:null
) if you want to scope access to a specific project -
debugLog
(default:false
),logger
(default:null
),messageFormatter
(default:null
) [ref] -
requestOptions
(default:[]
) [ref] -
disableAsserts
(default:false
) [ref] -
swiftLargeObjectThreshold
[ref] -
swiftSegmentSize
[ref] -
swiftSegmentContainer
[ref] -
prefix
(default:null
): Prefix to use for the names of the objects in the container. -
url
(default:null
): Override URL to use for public URLs to objects. If this is not set, the public URL will point to the public URL of Swift. This configuration is useful if you use a reverse proxy to pass through requests to public Swift containers.
Credits
- mzur for the original laravel-openstack-swift driver.
LICENSE
MIT