de-luxis / yii2-simple-filemanager
Simple filemanager for yii2 framework
Installs: 285
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 11
Type:yii2-extension
Requires
- ext-fileinfo: *
- yidas/yii2-fontawesome: ~2.0.0
- yiisoft/yii2: *
- yiisoft/yii2-bootstrap: *
This package is not auto-updated.
Last update: 2024-10-18 17:51:57 UTC
README
A simple file manager. Having minimal dependencies, but great opportunities for expansion.
Features
- Do not need a database. Consequently, there are no migrations.
- It's simple.
TODO
- Preview for images.
- Extended information about files.
- Possibility to limit the types of downloaded files through the configuration.
- Add support RBAC.
Screenshots
Basic app template
Empty files. Basic app template i18n.
Submodule.
Submodule i18n.
Installation
Run the command.
composer require de-luxis/yii2-simple-filemanager
Or add to your composer.json
"de-luxis/yii2-simple-filemanager": "*"
Now, register the module in the configuration of your application.
On an example of the basic application template config/web.php
'modules' => [
'filemanager' => [
'class' => 'DeLuxis\Yii2SimpleFilemanager\SimpleFilemanagerModule'
],
],
The file manager will be available at index.php?r=filemanager
Submodule
The file manager can be included as a submodule. For example, for your administration panel. To do this, in the method of initializing your module, you need to add an entry that the file manager will connect.
public function init()
{
parent::init();
$this->modules = [
'filemanager' => [
'class' => 'DeLuxis\Yii2SimpleFilemanager\SimpleFilemanagerModule',
'as access' => [
'class' => '\yii\filters\AccessControl',
'rules' => [
[
'allow' => true,
'roles' => ['@'],
],
]
]
]
];
}
With the help of a record as access
you can regulate access rights.