PHPackages                             tobento/app-file-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. tobento/app-file-storage

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

tobento/app-file-storage
========================

App file storage support.

2.0.2(3mo ago)01135MITPHPPHP &gt;=8.4

Since Jun 30Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/tobento-ch/app-file-storage)[ Packagist](https://packagist.org/packages/tobento/app-file-storage)[ Docs](https://www.tobento.ch)[ RSS](/packages/tobento-app-file-storage/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (9)Dependencies (9)Versions (11)Used By (5)

App File Storage
================

[](#app-file-storage)

File storage support for the app.

Table of Contents
-----------------

[](#table-of-contents)

- [Getting Started](#getting-started)
    - [Requirements](#requirements)
- [Documentation](#documentation)
    - [App](#app)
    - [File Storage Boot](#file-storage-boot)
        - [File Storage Config](#file-storage-config)
        - [File Storage Usage](#file-storage-usage)
- [Credits](#credits)

---

Getting Started
===============

[](#getting-started)

Add the latest version of the app file storage project running this command.

```
composer require tobento/app-file-storage

```

Requirements
------------

[](#requirements)

- PHP 8.4 or greater

Documentation
=============

[](#documentation)

App
---

[](#app)

Check out the [**App Skeleton**](https://github.com/tobento-ch/app-skeleton) if you are using the skeleton.

You may also check out the [**App**](https://github.com/tobento-ch/app) to learn more about the app in general.

File Storage Boot
-----------------

[](#file-storage-boot)

The file storage boot does the following:

- installs and loads file storage config file
- creates file storages based on storage config file

```
use Tobento\App\AppFactory;

// Create the app
$app = new AppFactory()->createApp();

// Add directories:
$app->dirs()
    ->dir(realpath(__DIR__.'/../'), 'root')
    ->dir(realpath(__DIR__.'/../app/'), 'app')
    ->dir($app->dir('app').'config', 'config', group: 'config')
    ->dir($app->dir('root').'public', 'public')
    ->dir($app->dir('root').'vendor', 'vendor');

// Adding boots:
$app->boot(\Tobento\App\FileStorage\Boot\FileStorage::class);

// Run the app:
$app->run();
```

You may check out the [**File Storage Service**](https://github.com/tobento-ch/service-file-storage) to learn more about it.

### File Storage Config

[](#file-storage-config)

The configuration for the file storage is located in the `app/config/file_storage.php` file at the default App Skeleton config location where you can specify the pools and caches for your application.

### File Storage Usage

[](#file-storage-usage)

You can access the file storage(s) in several ways:

**Using the app**

```
use Tobento\App\AppFactory;
use Tobento\Service\FileStorage\StoragesInterface;
use Tobento\Service\FileStorage\StorageInterface;

$app = new AppFactory()->createApp();

// Add directories:
$app->dirs()
    ->dir(realpath(__DIR__.'/../'), 'root')
    ->dir(realpath(__DIR__.'/../app/'), 'app')
    ->dir($app->dir('app').'config', 'config', group: 'config')
    ->dir($app->dir('root').'public', 'public')
    ->dir($app->dir('root').'vendor', 'vendor');

// Adding boots:
$app->boot(\Tobento\App\FileStorage\Boot\FileStorage::class);
$app->booting();

$storages = $app->get(StoragesInterface::class);

$defaultStorage = $app->get(StorageInterface::class);

// Run the app:
$app->run();
```

You may check out the [**File Storage Service**](https://github.com/tobento-ch/service-file-storage) to learn more about in general.

Check out the [**Storages Interface**](https://github.com/tobento-ch/service-file-storage#storages-interface) to learn more about storages.

Check out the [**Storage Interface**](https://github.com/tobento-ch/service-file-storage#storage-interface) to learn more about the storage.

**Using autowiring**

You can also request the interfaces in any class resolved by the app:

```
use Tobento\Service\FileStorage\StoragesInterface;
use Tobento\Service\FileStorage\StorageInterface;

class SomeService
{
    public function __construct(
        protected StoragesInterface $storages,
        protected StorageInterface $storage,
    ) {}
}
```

Credits
=======

[](#credits)

- [Tobias Strub](https://www.tobento.ch)
- [All Contributors](../../contributors)

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance81

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity68

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 ~94 days

Total

11

Last Release

101d ago

Major Versions

1.x-dev → 2.02025-10-01

PHP version history (2 changes)1.0.0PHP &gt;=8.0

2.0PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/055d6a1b5c2384bb179c75ab0b55914231d898fdc4dffeb30770f81200e52206?d=identicon)[TOBENTOch](/maintainers/TOBENTOch)

---

Top Contributors

[![tobento-ch](https://avatars.githubusercontent.com/u/16684832?v=4)](https://github.com/tobento-ch "tobento-ch (18 commits)")

---

Tags

packagefilestorageapptobento

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tobento-app-file-storage/health.svg)

```
[![Health](https://phpackages.com/badges/tobento-app-file-storage/health.svg)](https://phpackages.com/packages/tobento-app-file-storage)
```

PHPackages © 2026

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