drauta / ovh-object-storage-laravel by drauta

Integration with Ovh object container
1,147
18
5
Package Data
Maintainer Username: drauta
Maintainer Contact: od@about.me (Oscar)
Package Create Date: 2015-05-14
Package Last Update: 2020-06-01
Language: PHP
License: MIT
Last Refreshed: 2024-11-19 03:13:00
Package Statistics
Total Downloads: 1,147
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 18
Total Watchers: 5
Total Forks: 2
Total Open Issues: 1

Installation

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);