dp0 / filament-sanchaya
A powerful file manager plugin for Filament PHP with media picker support.
Requires
- php: ^8.3 || ^8.4
- ext-fileinfo: *
- ext-zip: *
- filament/filament: ^5.0
- illuminate/contracts: ^11.0 || ^12.0 || ^13.0
- illuminate/support: ^11.0 || ^12.0 || ^13.0
- livewire/livewire: ^4.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A file manager and media picker plugin for Laravel and Filament.
Documentation
Documentation for the current v1.1 series, including the v1.1.3 compatibility fix, is available at filament-sanchaya.dineshphuyel.com.np.
Requirements
- Filament v5
Installation
composer require dp0/filament-sanchaya php artisan sanchaya:install
Register the plugin in your Filament panel provider:
use DP0\Sanchaya\SanchayaPlugin; use Filament\Panel; public function panel(Panel $panel): Panel { return $panel ->plugins([ SanchayaPlugin::make(), ]); }
Picker directories
Use a relative directory to isolate files for a module while keeping the standalone file manager global:
SanchayaPicker::make('images') ->directory('products');
Storage paths can be customized in config/filament-sanchaya.php through storage.base_directory, storage.date_format, and storage.path_generator.
The picker checks file actions and saved selections against its directory and disk; the standalone manager remains global.
Large-file uploads are available as an opt-in chunked upload mode:
// config/filament-sanchaya.php 'file' => [ 'chunked' => true, 'max_chunked_file_size' => 102400, // KB 'chunk_size' => 1024, // KB per request ],
The picker can enable or disable the mode independently with ->chunked() or ->chunked(false). Standard uploads keep the Upload action disabled until the browser has finished transferring the selected file.
In a multiple-file picker, chunked uploads run sequentially and the dialog closes after the final file succeeds.
Development
Run the package tests from a Laravel application that includes this package source:
php artisan test packages/dp0/filament-sanchaya/tests