PHPackages                             nimblephp/storagebox - 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. nimblephp/storagebox

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

nimblephp/storagebox
====================

Universal file storage module for NimblePHP - stores files (local/MinIO/S3) with metadata in the database

0.0.1(today)00MITPHPPHP &gt;=8.2

Since Jun 30Pushed todayCompare

[ Source](https://github.com/NimbleMVC/Storagebox)[ Packagist](https://packagist.org/packages/nimblephp/storagebox)[ RSS](/packages/nimblephp-storagebox/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

nimblephp/storage-box
=====================

[](#nimblephpstorage-box)

Uniwersalny moduł przechowywania plików dla NimblePHP. Zapisuje pliki przez wybrany driver (lokalny system plików lub MinIO/S3) i przechowuje ich metadane w bazie danych (tabela `module_storage_file`).

Zawartość
---------

[](#zawartość)

- `Module` — rejestracja modułu i uruchamianie migracji (`onUpdate`)
- `ModuleStorageFileModel` — manager plików (zapis, kopiowanie, pobieranie, duplikacja, usuwanie, auto-usuwanie)
- `MinioStorage` — driver MinIO / AWS S3 (rozszerza `NimblePHP\Framework\Storage`)
- `StorageProvider` — enum providerów (`storage`, `minio`)
- `StorageBoxException` — wyjątek modułu
- `src/Migrations/` — migracja tworząca tabelę `module_storage_file`

Instalacja
----------

[](#instalacja)

```
composer require nimblephp/storage-box
```

Migracja
--------

[](#migracja)

Migracje uruchamiają się automatycznie przy aktualizacji aplikacji (`Module::onUpdate()`, grupa `module_storage_file`). Można też uruchomić ręcznie:

```
php vendor/bin/nimble migration:run --dir=vendor/nimblephp/storage-box/src/Migrations
```

Użycie
------

[](#użycie)

```
use NimblePHP\Storagebox\ModuleStorageFileModel;
use NimblePHP\Storagebox\StorageProvider;

$model = $this->loadModel(ModuleStorageFileModel::class);
$model->provider = StorageProvider::minio; // domyślnie StorageProvider::storage

// zapis z zawartości
$id = $model->write($content, type: 'avatar', fileName: 'photo.jpg');

// kopiowanie z lokalnej ścieżki
$id = $model->copy('/tmp/upload.jpg', type: 'attachment', fileName: 'upload.jpg');

// pobranie zawartości
$content = $model->getFileContent($id);

// usunięcie
$model->setId($id)->deleteFile();
```

Konfiguracja MinIO / S3 (zmienne środowiskowe)
----------------------------------------------

[](#konfiguracja-minio--s3-zmienne-środowiskowe)

- `MINIO_HOST` — endpoint MinIO; puste = tryb AWS S3
- `MINIO_BUCKET`
- `MINIO_REGION`
- `MINIO_USERNAME`
- `MINIO_PASSWORD`

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

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

---

Top Contributors

[![krzysztofzylka](https://avatars.githubusercontent.com/u/41385342?v=4)](https://github.com/krzysztofzylka "krzysztofzylka (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nimblephp-storagebox/health.svg)

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

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.7k277.8M969](/packages/league-flysystem-aws-s3-v3)[aws/aws-sdk-php-laravel

A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PHP.

1.7k37.3M83](/packages/aws-aws-sdk-php-laravel)[andersundsehr/aus-driver-amazon-s3

Provides a FAL driver for the Amazon Web Service AWS S3.

24269.9k](/packages/andersundsehr-aus-driver-amazon-s3)[flownative/aws-s3

This Flow package allows you to store assets (resources) in Amazon's S3

18187.3k](/packages/flownative-aws-s3)[kolay/xlsx-stream

Streaming XLSX reader and writer for PHP and Laravel. Constant memory regardless of file size, direct S3 multipart streaming, optional born-indexed random access.

436.0k](/packages/kolay-xlsx-stream)[mreduar/s3m

Multipart Uploads using Laravel and AWS S3

174.2k](/packages/mreduar-s3m)

PHPackages © 2026

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