tsdogs/yii2-fsmanager

Module for a simple File Manager

Installs: 17

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

dev-master 2020-06-12 13:26 UTC

This package is auto-updated.

Last update: 2024-11-12 23:15:15 UTC


README

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