Extension for file managing files on filesysstem
You can see the demo on the krajee website
-
The preferred way to install this extension is through composer.
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
'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 andmaxFileCount
onAttachmentsInput
to the number that you want
- May 26, 2017 - Initial version