liberusoftware/files-media-filament
Filament integration for the Liberu files-media package, providing resources and form fields to browse, upload, and manage files and media inside your Filament admin panel. Adds a consistent UI layer on top of the underlying files-media package for everyday file management tasks.
This package is a presentation adapter: it wires the Filament admin UI to the underlying liberusoftware/module-files-media domain module. Nothing here stores files by itself — the base module owns models, storage, and conversions; this package gives you Filament resources, form fields, and table columns on top of it. Understand that split before you write a line of code, or you'll waste time debugging the wrong layer.
Minimal steps:
composer require liberusoftware/files-media-filament
liberusoftware/module-files-media (its README, migrations, and HasMedia-style trait). This adapter is thin, and every real question — disks, conversions, model relationships — is answered there.composer show liberusoftware/files-media-filament and confirm the Filament major version it requires matches your panel (filament/filament:^3.0 vs ^4.0). A mismatch here is the most common install failure.php artisan vendor:publish --tag=files-media-config
php artisan vendor:publish --tag=files-media-migrations
php artisan migrate
->plugin(FilesMediaPlugin::make())) or a service provider listed in bootstrap/providers.php. Check the repo's src/ for a *Plugin.php or *ServiceProvider.php to see which pattern this version uses.src/Filament/Resources/ (or src/Resources/) directory. That is the entire surface area of the adapter — resources, forms, and tables. If it isn't there, it isn't in this package.First use case: attach an existing media item to a domain model. Create a resource that uses the base module's media relation, drop the adapter's file/media form component into the form schema, and confirm an upload lands on the expected disk. Do that end-to-end on a throwaway model before touching production resources.
Treat the adapter as UI glue, not a library. The patterns below assume you follow the base module's trait/contract conventions and only use this package for Filament components.
MediaPicker::make('featured_image')
->disk(config('files-media.disk'))
->directory('featured');
viewAny/create/delete there and let Filament pick it up. This keeps the adapter panel-agnostic.afterCreate hook (or use a relation manager). Filament's file upload lifecycle and the base module's attach logic don't always cooperate in a single create() call.MediaRelationManager on the parent resource is more predictable and gives you delete/reorder for free.Storage::fake('public');
// Livewire::test(...)->fillForm(...)->call('create');
Storage::disk('public')->assertExists(...);
NOASSERTION. That is not a green light. Before shipping to a client, read the LICENSE file in the repo and confirm terms with whoever owns the product. This is the single biggest blocker for production use."liberusoftware/files-media-filament": "1.2.3") and diff the src/ tree between updates rather than trusting semver.composer show -a. If it doesn't, fall back to a VCS repository entry pointing at a commit.Class "Filament\..." not found or Method ... does not exist, you almost certainly have a Filament v3/v4 mismatch. Check composer.json in the package against your panel.filesystems.default. Trace the whole chain once:
php artisan config:show files-media
Then clear caches (php artisan config:clear && php artisan filament:cache-components) after any change — Filament's component cache will happily serve you stale schemas.php artisan storage:link on the server. Missing symlinks produce broken images with no error, which is easy to misdiagnose as an adapter bug.HasMedia trait, model policies, and Filament's own extension mechanisms (relation managers, custom columns, closures on components). Avoid editing files under vendor/liberusoftware/ — composer will overwrite them.vendor/.How can I help you explore Laravel packages today?