Private documents
Invoices, contracts, imports, exports, and customer files.
Secure storage-area browsing, previews, uploads, and picker fields for private documents, public media, S3-compatible disks, and Spatie Media Library workflows.
Install the Filament package and allow Composer to update the shared core package.
composer require unifilemanager/filament-file-manager:^0.8 -W
php artisan optimize:clear
use UniFileManager\FilamentFileManager\FilamentFileManagerPlugin;
$panel
->plugin(FilamentFileManagerPlugin::make());
| Laravel | Filament | Livewire | PHP |
|---|---|---|---|
| 11.x | 4.x, 5.x | 3.x, 4.x | 8.2+ |
| 12.x | 4.x, 5.x | 3.x, 4.x | 8.2+ |
| 13.x | 4.x, 5.x | 3.x, 4.x | 8.2+ |
Storage areas define trusted server-side disks, roots, and visibility. Use private areas for documents and public areas only for media that can safely expose URLs.
Invoices, contracts, imports, exports, and customer files.
Website images, profile media, and other files intended for public URLs.
Named areas for tenant roots, product images, avatars, or application-specific libraries.
'storage_areas' => [
'public' => [
'enabled' => true,
'disk' => 'public',
'root' => 'file-manager/public',
'visibility' => 'public',
],
],
Use `UniFilePicker` in Filament forms to select existing files, upload directly, restrict MIME types, and target a specific storage area.
use UniFileManager\FilamentFileManager\Filament\Forms\Components\UniFilePicker;
UniFilePicker::make('document')
->privateMedia()
->acceptedFileTypes(['application/pdf']);
UniFilePicker::make('hero_image')
->storageArea('public');
UniFilePicker::make('attachments')
->multiple()
->maxFiles(10);
Sync selected File Manager files into Spatie Media Library collections while keeping the original file-manager objects intact.
composer require spatie/laravel-medialibrary
UniFilePicker::make('gallery')
->multiple()
->storageArea('public')
->collection('gallery');
When a storage area uses a root prefix, configure your Spatie path generator to honour the media row's `external_dir` custom property.
Uploaded files keep safe client filenames. Existing files are never overwritten; collisions become `filename (2).ext`, then `filename (3).ext`.
Preview images, PDFs, and text files from inside the File Manager.
Supported images receive thumbnails. Other files use clear file-type tiles.
Public media areas can expose copyable URLs for files intended to be public.
UniFileManager supports S3-compatible disks and Laravel Vapor temporary upload streams.
'storage_areas' => [
'private' => [
'enabled' => true,
'disk' => 's3',
'root' => 'file-manager/private',
'visibility' => 'private',
],
],
`unifilemanager/core` v0.1.4 optimizes object-store directory listings by using Flysystem listing metadata instead of extra metadata calls per entry.
Tenant-aware applications can return trusted tenant-specific disk and root configuration through a storage-area resolver.
'storage_area_resolver' => App\Support\TenantStorageAreaResolver::class,
Never trust browser-supplied disks or roots. Storage area definitions should come from server-side configuration or trusted tenant state.
Publish configuration when you need to customize areas, authorization, picker defaults, previews, uploads, or navigation.
php artisan vendor:publish --tag=filament-file-manager-config
FilamentFileManagerPlugin::make()
->navigationLabel('Files')
->navigationIcon('heroicon-o-folder')
->navigationSort(20);
composer require unifilemanager/filament-file-manager:^0.8 -W
php artisan filament:assets
php artisan optimize:clear
If you published package views, compare them with the latest package views before upgrading.
Thanks to @FaizAhmadSE for contributing the original picker, media-library, and theme-aware UI implementation work.