Search by

dp0 / filament-sanchaya

dinesh-phuyel

A powerful file manager plugin for Filament PHP with media picker support.

v1.1.3 2026-10-21 15:40 UTC

This package is auto-updated.

Last update: 2026-10-21 16:01:27 UTC


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

License

MIT