drauta / ovh-object-storage-laravel
Integration with Ovh object container
Installs: 1 147
Dependents: 0
Suggesters: 0
Security: 0
Stars: 18
Watchers: 5
Forks: 2
Open Issues: 1
Requires
- php: >=5.4.0
- illuminate/support: 5.*.*
- rackspace/php-opencloud: ~1.14
This package is not auto-updated.
Last update: 2024-11-23 19:53:39 UTC
README
Install using composer:
composer require drauta/ovh-object-storage-laravel "dev-master"
add to config/app.php
Drauta\OvhObjectStorage\OvhServiceProvider::class,
Add the following to the config/filesystem.php
'ovh' => [ 'driver' => 'ovh', 'username' => 'yourUsername', 'password' => 'yourPassword', 'tenantId' => 'yourTeenantId', 'region' => 'yourRegion', 'container'=> 'yourContainer', 'container_url' => 'containerPublicURL' ],
Laravel
This package provides an integration with OVH object container.
Usage:
Saves the form file: $filename not mandatory
Storage::disk('ovh')->filePut($request->file('file'), $filename = null);
Get the file url from config container public URL (for speed optimization, no call is made to OS api):
Storage::disk('ovh')->fileGetUrl($filename);
Get the file url from container (call to OS api, slower than fileGetUrl() ):
Storage::disk('ovh')->fileGet($filename);
Return if a file exists (true or false)
Storage::disk('ovh')->fileExists($filename);