PHPackages                             railroad/remotestorage - 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. railroad/remotestorage

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

railroad/remotestorage
======================

Remote storage service

v3.0.0(1y ago)084.7k1PHPPHP ^8.2

Since Mar 1Pushed 1y ago2 watchersCompare

[ Source](https://github.com/railroadmedia/remotestorage)[ Packagist](https://packagist.org/packages/railroad/remotestorage)[ RSS](/packages/railroad-remotestorage/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (10)Used By (1)

remotestorage
=============

[](#remotestorage)

Wrapper for slightly easier use of [*`league/flysystem`*](https://github.com/thephpleague/flysystem) with AWS S3 by our Laravel application.

- [remotestorage](#remotestorage)
    - [Installation, Configuration, Use](#installation--configuration--use)
        - [Installation](#installation)
        - [Configuration](#configuration)
        - [Use](#use)
    - [RemoteStorageService](#remotestorageservice)
        - [put](#put)
            - [Usage Example](#usage-example)
            - [Parameters](#parameters)
            - [Responses](#responses)
        - [read](#read)
            - [Usage Example](#usage-example-1)
            - [Parameters](#parameters-1)
            - [Responses](#responses-1)
        - [exists](#exists)
            - [Usage Example](#usage-example-2)
            - [Parameters](#parameters-2)
            - [Responses](#responses-2)
        - [delete](#delete)
            - [Usage Example](#usage-example-3)
            - [Parameters](#parameters-3)
            - [Responses](#responses-3)
        - [create\_dir](#create-dir)
        - [rename](#rename)
        - [copy](#copy)
        - [get\_mimetype](#get-mimetype)
        - [get\_timestamp](#get-timestamp)
        - [get\_size](#get-size)
        - [delete\_dir](#delete-dir)

Installation, Configuration, Use
--------------------------------

[](#installation-configuration-use)

### Installation

[](#installation)

Run `$ composer vendor:publish` to copy the package's configuration file "*/config/remotestorage.php*" to your application's "*/config*" directory.

*(assuming you're using Composer, Laravel, and AWS S3)*

### Configuration

[](#configuration)

Define the following environmental variables with appropriate values:

- *AWS\_ACCESS\_KEY\_ID*
- *AWS\_SECRET\_ACCESS\_KEY*
- *AWS\_DEFAULT\_REGION*
- *AWS\_BUCKET*

Add the service provider (`\Railroad\RemoteStorage\Providers\RemoteStorageServiceProvider`) to the `'providers` array in you application's */config/app.php*:

```
'providers' => [
    # ...
    \Railroad\RemoteStorage\Providers\RemoteStorageServiceProvider::class,
]
```

Run `$ php artisan vendor:publish` to copy the config file and create a *remotestorage.php* file in your application's */config* directory. This will take the values you supplied in the *.env* file and pass them needed.

### Use

[](#use)

Inject the `Railroad\RemoteStorage\Services\RemoteStorageService` class where needed

```
/** @var Railroad\RemoteStorage\Services\RemoteStorageService $remoteStorageService */
protected $remoteStorageService;

public function __constructor(Railroad\RemoteStorage\Services\RemoteStorageService $remoteStorageService){
    $this->remoteStorageService = $remoteStorageService;
}
```

Include namespace at top of file:

```
use Railroad\RemoteStorage\Services;
```

... to save yourself having to specify the namespace everywhere:

```
/** @var RemoteStorageService $remoteStorageService */
protected $remoteStorageService;

public function __constructor(RemoteStorageService $remoteStorageService){
    $this->remoteStorageService = $remoteStorageService;
}
```

#### Responses

[](#responses)

outcomereturn data typereturn data valuesucceededbooleantruefailedbooleanfalse### read

[](#read)

#### Usage Example(s)

[](#usage-examples)

```
$file = $this->remoteStorageService->read($filenameRelative);
```

#### Parameters

[](#parameters)

\#namerequiredtypedescription1filenameRelativeyesstringpath to file name from bucket root#### Responses

[](#responses-1)

outcomereturn data typereturn data value (example)notes about return datafailedbooleanfalsesucceededstring`"b"""Ø à\x00\x10JFIF\x00\x01\x01\x01\x00`\\x00`\x00\x00 ■\x00;CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 70\n █\x00C\x00\n\x07\x07\x08\x07\x06\n\x08\x08\x08\v\n\n"`Raw image data as string### exists

[](#exists)

#### Usage Example(s)

[](#usage-examples-1)

```
$exists = $this->remoteStorageService->exists('foo/bar.jpg');
```

```
/**
 * @param Request $request
 * @return JsonResponse
 */
public function uploadThumbnailIfDoesNotAlreadyExist(Request $request)
{
    $target = 'foo/' . $request->get('target');
    if(!$this->remoteStorageService->exists('foo/')){
        $upload = $this->remoteStorageService->put($target, $request->file('file'));
        throw_if((!$upload), new JsonResponse('Upload product thumbnail failed', 400));
    }
    return new JsonResponse(['exists' => true]);
}
```

#### Parameters

[](#parameters-1)

\#namerequiredtypedescription1filenameRelativeyesstringpath to file name from bucket root#### Responses

[](#responses-2)

outcomereturn data typereturn data valueexistsbooleantruedoes not existbooleanfalse### delete

[](#delete)

#### Usage Example(s)

[](#usage-examples-2)

```
$this->remoteStorageService->delete('foo/bar.jpg');
```

```
public function deleteThumbnail(Request $request)
{
    $target = $request->get('target');
    $delete = $this->remoteStorageService->delete('foo/' . $target);
    throw_if((!$delete), new JsonResponse('product thumbnail deletion failed', 400));
    return new JsonResponse(['deleted' => true]);
}
```

#### Parameters

[](#parameters-2)

\#namerequiredtypedescription1filenameRelativeyesstringpath to file name from bucket root#### Responses

[](#responses-3)

outcomereturn data typereturn data valueexistsbooleantruedoes not existbooleanfalse### create\_dir

[](#create_dir)

*\[TODO\]*

### rename

[](#rename)

*\[TODO\]*

### copy

[](#copy)

*\[TODO\]*

### get\_mimetype

[](#get_mimetype)

*\[TODO\]*

### get\_timestamp

[](#get_timestamp)

*\[TODO\]*

### get\_size

[](#get_size)

*\[TODO\]*

### delete\_dir

[](#delete_dir)

*\[TODO\]*

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 55.6% 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 ~295 days

Recently: every ~207 days

Total

9

Last Release

637d ago

Major Versions

v0.0.1 → v1.0.02018-06-25

v1.0.x-dev → v2.0.02022-05-13

v2.0.x-dev → v3.0.02024-08-19

PHP version history (3 changes)v0.0.1PHP ~7

v2.0.0PHP ^8.1

v3.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/205e2d39157a11094e112cd3b2433bdc3449a3c30d67769f322b33169c3b8c70?d=identicon)[calebfavor](/maintainers/calebfavor)

---

Top Contributors

[![roxanariza](https://avatars.githubusercontent.com/u/11618485?v=4)](https://github.com/roxanariza "roxanariza (5 commits)")[![calebfavor](https://avatars.githubusercontent.com/u/5841780?v=4)](https://github.com/calebfavor "calebfavor (2 commits)")[![JonathanTM](https://avatars.githubusercontent.com/u/5752974?v=4)](https://github.com/JonathanTM "JonathanTM (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/railroad-remotestorage/health.svg)

```
[![Health](https://phpackages.com/badges/railroad-remotestorage/health.svg)](https://phpackages.com/packages/railroad-remotestorage)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[contica/facturador-electronico-cr

Un facturador de código libre para integrar facturación electrónica en Costa Rica a un proyecto PHP

2128.8k](/packages/contica-facturador-electronico-cr)[dgtlss/capsule

A Laravel package for backing up databases and files to external sources with notifications

194.3k](/packages/dgtlss-capsule)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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