naf / storage
Provider-independent file storage with named disks and streams for NAF.
Requires
- php: >=8.3
- naf/framework: ^0.2
Requires (Dev)
- aws/aws-sdk-php: ^3.395.2
- friendsofphp/php-cs-fixer: 3.95.25
- phpunit/phpunit: ^11.5 || ^12.1
Suggests
- ext-dom: Required for WebDAV property responses.
- aws/aws-sdk-php: ^3.395.2 for S3 storage (signing and multipart operations).
- naf/client: ^0.2.2 for S3 and WebDAV through the native streaming HTTP client.
Provides
None
Conflicts
- aws/aws-sdk-php: <3.395.2
- naf/client: <0.2.2
Replaces
None
This package is auto-updated.
Last update: 2026-09-19 10:40:35 UTC
README
Provider-independent file storage for NAF.
One API over local disks, S3-compatible services and WebDAV. Named disks keep public assets and private documents apart, streams keep large files out of memory, and the helper is namespaced like every other NAF plugin helper.
use function Naf\Storage\storage; storage()->put('foo.txt', 'Hello World'); storage('documents')->put('invoices/2026/1234.pdf', $contents); storage('public')->url('avatars/123.jpg');
🧩 Part of the official NAF plugin collection. Install it when your application handles files, and nothing else.
Documentation
What this package does, how the disks are configured and what each adapter needs lives in the NAF documentation. Not sure which packages you need? Start here.
Install
composer require naf/storage
License
MIT. Part of NAF.