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.2(1mo ago)0190MITPHPPHP &gt;=8.2

Since Jun 30Pushed 1mo agoCompare

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

READMEChangelog (2)Dependencies (10)Versions (3)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

40

—

FairBetter than 86% of packages

Maintenance91

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

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

Every ~0 days

Total

2

Last Release

44d 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 (3 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.7k293.8M1.1k](/packages/league-flysystem-aws-s3-v3)[leantime/leantime

Open source project management system for non-project managers. Simple like Trello, powerful like Jira. Built with neurodiversity in mind.

11.3k4.0k](/packages/leantime-leantime)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45844.8k1](/packages/pressbooks-pressbooks)[ellaisys/aws-cognito

Laravel Authentication using AWS Cognito (Web and API)

121269.8k1](/packages/ellaisys-aws-cognito)[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.

4512.6k](/packages/kolay-xlsx-stream)[altis/core

Core module for Altis

19233.0k4](/packages/altis-core)

PHPackages © 2026

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