Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lhapaipai/mini-file-manager-template
Template model for Mini File Manager
https://github.com/lhapaipai/mini-file-manager-template
file-manager starter-project symfony
Last synced: 6 days ago
JSON representation
Template model for Mini File Manager
- Host: GitHub
- URL: https://github.com/lhapaipai/mini-file-manager-template
- Owner: lhapaipai
- Created: 2021-08-07T22:14:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-27T15:47:41.000Z (over 1 year ago)
- Last Synced: 2024-10-12T14:44:19.466Z (about 1 month ago)
- Topics: file-manager, starter-project, symfony
- Language: PHP
- Homepage: https://mini-file-manager.pentatrion.com
- Size: 686 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mini File Manager Starter Template
This repository presents a complete example of the integration of the [mini-file-manager](https://github.com/lhapaipai/mini-file-manager) package with the [pentatrion/upload-bundle](https://github.com/lhapaipai/upload-bundle) bundle in a Symfony backend.
## Installation
```bash
git clone https://github.com/lhapaipai/mini-file-manager-template.gitgit submodule update --init
chmod -R 777 var/{cache,log} public/{uploads,media}
composer install
# configure DATABASE_URL from .env (form example)
symfony console doctrine:database:create
symfony console doctrine:migrations:migrate -nnpm install
npm run build
```## Dependancies
## pentatrion/upload-bundle configuration for MiniFileManager
If you use this bundle with MiniFileManager and liipImagineBundle, you need to add additional filters.
```yaml
# config/packages/pentatrion_upload.yaml
# default configuration
pentatrion_upload:
file_infos_helper: 'Pentatrion\UploadBundle\Service\FileInfosHelper'
origins:
public_uploads:
# if directory is inside %kernel.project_dir%/public, files
# will be directly accessible.
path: "%kernel.project_dir%/public/uploads"
# prefix to add in order to be found by a liip_imagine loader
liip_path: "/uploads"# # if you want private upload directory
# private_uploads:
# path: "%kernel.project_dir%/var/uploads"
# liip_path: ""
liip_filters: ["small", "large"]
``````yaml
# config/packages/liip_imagine.yaml
liip_imagine:
driver: "gd"# define filters defined in pentatrion_upload.liip_filters
# (at least small filter)
filter_sets:
small:
filters:
thumbnail: { size: [250, 250], mode: inset, allow_upscale: true }large:
filters:
thumbnail: { size: [1500, 1500], mode: inset, allow_upscale: false }loaders:
default:
filesystem:
data_root:
# must be linked with pentatrion_upload -> origin.[origin-name].liip_path
- "%kernel.project_dir%/public"# if you want private upload directory
# - "%kernel.project_dir%/var/uploads"
```