alfasix / alfakit-file-manager
A Google-Drive-lite file manager for any Laravel filesystem disk in AlfaKit panels: folders, uploads with progress, drag and drop, previews, zip downloads, trash, shareable links and a file picker field. Every operation is authorised, path-checked and tenant-scoped.
Requires
- php: ^8.3
- ext-fileinfo: *
- alfasix/alfakit: ^0.1|@dev
Requires (Dev)
None
Suggests
- ext-zip: Download several files or folders as one zip archive.
- alfasix/alfakit-media-library: Add files picked with FileManagerPicker to a Spatie media library collection.
Provides
None
Conflicts
None
Replaces
None
README
by Alfa Six
This is a read-only split of the AlfaKit monorepo. Please open issues and pull requests there.
A Google-Drive-lite file manager for any Laravel filesystem disk in AlfaKit panels: folders, grid and list views, search, multi-selection, drag-and-drop uploads with progress, move, copy, rename, trash, previews, zip downloads and shareable links, plus a FileManagerPicker form field. Every operation is authorised, path-checked and tenant-scoped on the server.
Installation
composer require alfasix/alfakit-file-manager
The UI ships with @alfakit/react, @alfakit/vue and @alfakit/svelte. For revocable public links, publish and run the migration:
php artisan vendor:publish --tag=alfakit-file-manager-migrations php artisan migrate
Register
use AlfaSix\AlfakitFileManager\FileManagerPlugin; $panel->plugin( FileManagerPlugin::make() ->disks(['public', 's3' => 'Cloud']) ->maxUploadSize(20 * 1024) ->acceptedFileTypes(['image/*', 'application/pdf']) ->authorize(fn (User $user): bool => $user->can('manage-files')), );
Picker field
use AlfaSix\AlfakitFileManager\Forms\Components\FileManagerPicker; FileManagerPicker::make('attachment')->directory('invoices')->acceptedFileTypes(['application/pdf']);
Full documentation: alfakit.dev/docs/plugins/file-manager.
License
MIT. See LICENSE.md.