yii2-extension yii2-fsmanager
Module for a simple File Manager
tsdogs/yii2-fsmanager
Module for a simple File Manager
- Tuesday, May 30, 2017
- by tsdogs
- Repository
- 1 Watchers
- 0 Stars
- 4 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
Yii2 fsmanager
, (*1)
Extension for file managing files on filesysstem, (*2)
Demo
You can see the demo on the krajee website, (*3)
Installation
1. The preferred way to install this extension is through composer., (*4)
Either run
```
php composer.phar require tsdogs/yii2-fsmanager "~1.0.0"
```
or add
```
"tsdogs/yii2-fsmanager": "~1.0.0"
```
to the require section of your `composer.json` file.
-
Add module to common/config/main.php
, (*5)
'modules' => [
...
'fsmanager' => [
'class' => tsdogs\fsmanager\Module::className(),
'tempPath' => '@app/uploads/temp',
'publicPath' => '@app/uploads/store',
'rules' => [ // Rules according to the FileValidator
'maxFiles' => 10, // Allow to upload maximum 3 files, default to 3
'mimeTypes' => 'image/png', // Only png images
'maxSize' => 1024 * 1024 // 1 MB
],
'viewRoles' => ['@'], // roles able to view files
'uploadRoles' => ['admins'], // roles able to manage files
]
...
]
-
Make sure that you specified maxFiles
in module rules and maxFileCount
on AttachmentsInput
to the number that you want, (*6)
Change log
-
May 26, 2017 - Initial version