PHPackages                             hedii/laravel-ovh-swift-storage - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. hedii/laravel-ovh-swift-storage

ActiveLibrary[File &amp; Storage](/categories/file-storage)

hedii/laravel-ovh-swift-storage
===============================

Out of the box Ovh Swift storage usage for Laravel

4.2.0(5y ago)78671[1 issues](https://github.com/hedii/laravel-ovh-swift-storage/issues)MITPHPPHP ^7.4|^8.0

Since Jan 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/hedii/laravel-ovh-swift-storage)[ Packagist](https://packagist.org/packages/hedii/laravel-ovh-swift-storage)[ RSS](/packages/hedii-laravel-ovh-swift-storage/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (8)Dependencies (3)Versions (10)Used By (0)

[![Build Status](https://github.com/hedii/laravel-ovh-swift-storage/workflows/Tests/badge.svg)](https://github.com/hedii/laravel-ovh-swift-storage/actions)[![Total Downloads](https://camo.githubusercontent.com/4e846e6056ef4a0fe1e03fc472405f382ef52ec860e2946745b9df15a8396e6b/68747470733a2f2f706f7365722e707567782e6f72672f68656469692f6c61726176656c2d6f76682d73776966742d73746f726167652f646f776e6c6f616473)](//packagist.org/packages/hedii/laravel-ovh-swift-storage)[![License](https://camo.githubusercontent.com/efa4e8f3ce0f811915f27816e88e30ba202fe79188b37ac21234b3669c19d8e5/68747470733a2f2f706f7365722e707567782e6f72672f68656469692f6c61726176656c2d6f76682d73776966742d73746f726167652f6c6963656e7365)](https://github.com/hedii/laravel-ovh-swift-storage/blob/master/LICENSE.md)[![Latest Stable Version](https://camo.githubusercontent.com/161d2ebcd17da8a52fa89f7ae7fb03b4cbdc964b3fabc627731348466d0c32fc/68747470733a2f2f706f7365722e707567782e6f72672f68656469692f6c61726176656c2d6f76682d73776966742d73746f726167652f76)](//packagist.org/packages/hedii/laravel-ovh-swift-storage)

Laravel Ovh Swift Storage
=========================

[](#laravel-ovh-swift-storage)

Out of the box [Ovh Swift storage](https://www.ovhcloud.com/en-ie/public-cloud/object-storage/) usage for Laravel 6.0+

Table of contents
-----------------

[](#table-of-contents)

- [Table of contents](#table-of-contents)
- [Installation](#installation)
- [Usage](#usage)
    - [Private containers](#private-containers)
    - [Request options](#request-options)
    - [Example](#example)
- [Testing](#testing)
- [License](#license)

Installation
------------

[](#installation)

Install via [composer](https://getcomposer.org/doc/00-intro.md)

```
composer require hedii/laravel-ovh-swift-storage
```

Edit `config/filesystems.php` to add the new `ovh-swift` disk

```
return [

    'disks' => [
        /* ... */

        'ovh-swift' => [
            'driver' => 'ovh-swift',
            'authUrl' => env('OVH_SWIFT_OPENSTACK_AUTH_URL', 'https://auth.cloud.ovh.net/v3/'),
            'region' => env('OVH_SWIFT_OPENSTACK_REGION'),
            'projectId' => env('OVH_SWIFT_OPENSTACK_PROJECT_ID'),
            'containerName' => env('OVH_SWIFT_CONTAINER_NAME'),
            'prefix' => env('OVH_SWIFT_PREFIX'),
            'username' => env('OVH_SWIFT_OPENSTACK_USERNAME'),
            'password' => env('OVH_SWIFT_OPENSTACK_PASSWORD'),
            'visibility' => env('OVH_SWIFT_VISIBILITY', 'public'),
            'publicUrl' => env('OVH_SWIFT_PUBLIC_URL'),
            'urlKey' => env('OVH_SWIFT_URL_KEY'),
            'requestOptions' => [],
        ],

    ],

];
```

Edit `.env` to add the required environment variables

```
OVH_SWIFT_OPENSTACK_REGION=GRA
OVH_SWIFT_OPENSTACK_PROJECT_ID=xxxxxxxxxxxxxxxxxxx
OVH_SWIFT_CONTAINER_NAME=xxxxxxxxxxxxxxxxxxx
OVH_SWIFT_OPENSTACK_USERNAME=xxxxxxxxxxxxxxxxxxx
OVH_SWIFT_OPENSTACK_PASSWORD=xxxxxxxxxxxxxxxxxxx

```

Usage
-----

[](#usage)

Once you have modified the Laravel filesystem configuration and the environment variables, you can use the new Ovh Swift storage disk [as any Laravel storage disk](https://laravel.com/docs/6.x/filesystem#obtaining-disk-instances).

### Private containers

[](#private-containers)

By default, this package assumes you are using a public Object Storage container.

If you want to use a private container with temporary urls, you have to configure a [temporary url key](https://docs.ovh.com/ie/en/public-cloud/share_an_object_via_a_temporary_url/) and set the visibility to `private`.

```
OVH_SWIFT_OPENSTACK_REGION=GRA
OVH_SWIFT_OPENSTACK_PROJECT_ID=xxxxxxxxxxxxxxxxxxx
OVH_SWIFT_CONTAINER_NAME=xxxxxxxxxxxxxxxxxxx
OVH_SWIFT_OPENSTACK_USERNAME=xxxxxxxxxxxxxxxxxxx
OVH_SWIFT_OPENSTACK_PASSWORD=xxxxxxxxxxxxxxxxxxx
OVH_SWIFT_VISIBILITY=private
OVH_SWIFT_URL_KEY=xxxxxxxxxxxxxxxxxxx

```

Be aware you will not be able to retrieve regular urls with a private container, only temporary urls.

### Request options

[](#request-options)

If you want to use http [request options](https://docs.guzzlephp.org/en/6.5/request-options.html#on-headers) like `timeout`, `connect_timeout` or any other valid option, put them in the driver configuration.

```
return [

    'disks' => [
        /* ... */

        'ovh-swift' => [
            /* ... */
            'requestOptions' => [
                'timeout' => 3.14,
                'connect_timeout' => 3.14,
            ],
        ],

    ],

];
```

### Example

[](#example)

```
use Illuminate\Support\Facades\Storage;

Storage::disk('ovh-swift')->put('avatars/1', $fileContents);

$url = Storage::url('avatars/1');

// if using private containers:
$temporaryUrl = Storage::temporaryUrl('avatars/1', now()->addMinute());
```

Testing
-------

[](#testing)

If you want to test the package, you must create a new Openstack user and two new Ovh Object Storage containers:

- A public container named `test`
- A private container named `test-private`

Once it's done, copy `phpunit.xml.dist` to `phpunit.xml` and update the environment variables.

Be aware that the test suite will delete all files in the containers after each test. **Do not test against a production containers!**

To start test suite, run this command:

```
composer test

```

License
-------

[](#license)

laravel-ovh-swift-storage is released under the MIT Licence. See the bundled [LICENSE](https://github.com/hedii/laravel-ovh-swift-storage/blob/master/LICENSE.md) file for details.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~54 days

Recently: every ~88 days

Total

9

Last Release

1861d ago

Major Versions

1.2.0 → 2.0.02020-04-20

2.0.0 → 3.0.02020-09-22

3.0.0 → 4.0.02020-10-12

PHP version history (2 changes)1.0.0PHP ^7.4.0

4.2.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/e4a5db1cfc95de95128aba94b6f26a69d543e7f1e95f5f9afcdaf7e1db836fe1?d=identicon)[hedii](/maintainers/hedii)

---

Top Contributors

[![hedii](https://avatars.githubusercontent.com/u/5358048?v=4)](https://github.com/hedii "hedii (17 commits)")

---

Tags

diskflysystemflysystem-adapterlaravelobject-storageopenstackopenstack-swiftovhovh-swift-storagestoragestorage-containerstemporary-urlsfilesystemlaravelstorageOpenstackhediiovhswiftdisk

### Embed Badge

![Health badge](/badges/hedii-laravel-ovh-swift-storage/health.svg)

```
[![Health](https://phpackages.com/badges/hedii-laravel-ovh-swift-storage/health.svg)](https://phpackages.com/packages/hedii-laravel-ovh-swift-storage)
```

###  Alternatives

[sausin/laravel-ovh

OVH Object Storage driver for laravel

40153.5k](/packages/sausin-laravel-ovh)[nimbusoft/flysystem-openstack-swift

Flysystem adapter for OpenStack Swift

44774.4k6](/packages/nimbusoft-flysystem-openstack-swift)[gliterd/laravel-backblaze-b2

Backblaze B2 Cloud Storage for Laravel 5

5341.6k](/packages/gliterd-laravel-backblaze-b2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
