Skip to content

tsdogs/yii2-fsmanager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Yii2 fsmanager

Latest Stable Version License Build Status Code Coverage Scrutinizer Code Quality Total Downloads

Extension for file managing files on filesysstem

Demo

You can see the demo on the krajee website

Installation

  1. 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.

  2. 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
    	]
    	...
    ]
  3. Make sure that you specified maxFiles in module rules and maxFileCount on AttachmentsInput to the number that you want

Change log

  • May 26, 2017 - Initial version

About

Yii2 Simple File Manager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages