Yii2 simple filemanager
, (*1)
A simple file manager. Having minimal dependencies, but great opportunities for expansion., (*2)
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, (*3)
, (*4)
Empty files. Basic app template i18n., (*5)
, (*6)
Submodule., (*7)
, (*8)
Submodule i18n., (*9)
, (*10)
Installation
Run the command., (*11)
composer require de-luxis/yii2-simple-filemanager
, (*12)
Or add to your composer.json, (*13)
"de-luxis/yii2-simple-filemanager": "*"
, (*14)
Now, register the module in the configuration of your application., (*15)
On an example of the basic application template config/web.php
, (*16)
'modules' => [
'filemanager' => [
'class' => 'DeLuxis\Yii2SimpleFilemanager\SimpleFilemanagerModule'
],
],
The file manager will be available at index.php?r=filemanager
, (*17)
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., (*18)
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., (*19)