mezcalito / ux-filemanager
Effortless file management with Symfony UX and Mezcalito UX FileManager
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 13
Watchers: 4
Forks: 2
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.3
- symfony/dependency-injection: ^6.4|^7.0
- symfony/http-foundation: ^6.4|^7.0
- symfony/http-kernel: ^6.4|^7.0
- symfony/options-resolver: ^6.4|^7.0
- symfony/routing: ^6.4|^7.0
- symfony/ux-live-component: ^2.17
- symfony/ux-twig-component: ^2.17
- twig/twig: ^3.0.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.57
- phpstan/phpstan: ^1.11
- phpstan/phpstan-symfony: ^1.4
- phpunit/phpunit: ^11.1
- rector/rector: ^1.1
- symfony/asset: ^6.4|^7.0
- symfony/asset-mapper: ^6.4|^7.0
- symfony/browser-kit: ^7.1
- symfony/css-selector: ^7.1
- symfony/framework-bundle: ^6.4|^7.0
- symfony/stimulus-bundle: ^2.17
- symfony/test-pack: ^1.0
- symfony/twig-bundle: ^6.4|^7.0
- symfony/web-profiler-bundle: ^7.0
This package is auto-updated.
Last update: 2024-12-04 07:07:20 UTC
README
Overview
The Mezcalito File Manager Bundle provides an easy-to-use file management system in your Symfony application using Twig Components and Live Components. It allows you to create and manage multiple storages, each with its unique configuration. Currently, the bundle supports only a local filesystem provider.
Installation
Add mezcalito/ux-filemanager to your composer.json file:
composer require mezcalito/ux-filemanager
Register and configure the bundle
If you are using Symfony Flex, the following steps should be done automatically. Otherwise, follow the instructions.
Register the bundle
Inside config/bundles.php
, add the following line:
// config/bundles.php return [ // ... Mezcalito\FileManagerBundle\MezcalitoFileManagerBundle::class => ['all' => true], ];
Configuration
To configure the bundle, add the following configuration to your config/packages/mezcalito_file_manager.yaml
file.
This example demonstrates how to set up a local storage:
mezcalito_file_manager: storages: local: uri_prefix: /media provider: local options: path: '%kernel.project_dir%/public/uploads/storages/local' media_url: 'https://media.yourdomain.com/' ignore_dot_files: true
Storage Configuration Options
Usage
Once the bundle is installed and configured, you can use the file manager in your Twig templates. Here's how to include it in your template:
Using Twig Syntax
{{ component('Mezcalito:FileManager:FileSystem', { storage: 'local' }) }}
Using HTML-like Syntax
<twig:Mezcalito:FileManager:FileSystem storage="local"/>
In both cases, replace local
with the name of the storage you want to use.
Issues and feature requests
Please report issues and request features at https://github.com/mezcalito/ux-filemanager/issues.
License
This bundle is under the MIT license. For the whole copyright, see the LICENSE file distributed with this source code.