Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Saurabh Singhvi committed Aug 2, 2017
1 parent 25f9610 commit bcf7f0d
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,28 @@ as below
'tenantName' => env('OVH_TENANT_NAME'),
'container' => env('OVH_CONTAINER'),
'projectId' => env('OVH_PROJECT_ID'),
'urlKey' => env('OVH_URL_KEY'),
],
```

define the correct env variables above in your .env file and you should now have a working OVH Object Storage setup :)

# Usage

Refere to extensive laravel [documentation](https://laravel.com/docs/5.4/filesystem) for usage. Of note - this package includes support for the `Storage::url()` method.
Refere to extensive laravel [documentation](https://laravel.com/docs/5.4/filesystem) for usage. Of note - this package includes support for the following additional methods:

In addition, the [large object support](https://www.ovh.com/us/g1951.optimised_method_uploading_files_object_storage) in OVH has also been implemented. Note that the large object support only works for stream resources (the object obtained from `fopen` for example).
`Storage::url()`

and

`Storage::temporaryUrl()`

The temporary url is relevant for private containers where files are not publicly accessible under normal conditions. This generates a temporary url with expiry (see details [here](https://github.com/laravel/framework/pull/20375) for usage).

Note that this requires the container to have a proper header. The key in the header should match the `urlKey` specified in `filesystems.php`. For details on how to setup the header on your OVH container, see [here](https://www.ovh.com/us/g2007.share_object_via_temporary_url#generate_your_temporary_url).

# Credits
- the SwiftAdapter was created by Nimbusoft (https://github.com/nimbusoftltd/flysystem-openstack-swift) and I have just modified it to provide the url function
- cyberx86 did the hard work of figuring out how to get the Openstack setup going with OVH (https://www.thatsgeeky.com/2016/08/openstack-php-and-ovh/)
- rackspace for maintaining the Openstack repo (https://github.com/php-opencloud/openstack)
- obviously the creator of league flysystem!
- obviously the creator of league flysystem!

0 comments on commit bcf7f0d

Please sign in to comment.