gevman/yii2-file-manager File Manager Module for Yii2

File Manager Module for Yii2

add this to web.php

'bootstrap' => [/* other, */'file-manager'/*, other*/],
// and
'modules' => [
    /* other, */
    'file-manager' => [
        'class' => Gevman\FileManager\Module::class,
        'returnFullPath' => false,
        'uploadFolder' => '/uploads',
        'allowedExtensions' => [
            'images' => ['jpg', 'png', 'gif'],
        ],
        'cacheComponent' => 'cache',
        'beforeAction' => function() {
            if (Yii::$app->user->isGuest) {
                throw new \yii\web\ForbiddenHttpException(Yii::t('yii', 'You are not allowed to perform this action.'));
            }
        }
    ],
    /*, other*
],

there is also console command for automating file thumb indexing

in console config set @webroot alias first after add this to config file


'bootstrap' => [/* other, */'file-manager'/*, other*/],
// and
'modules' => [
    /* other, */
    'file-manager' => [
        'class' => Gevman\FileManager\Module::class,
        'returnFullPath' => true,
        'uploadFolder' => '/uploads',
        'cacheComponent' => 'cache',
    ],
    /*, other*
],

after run `php yii file-manager/index-files`

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



2.3.2 is the latest of 16 releases



MIT license
Stats
8 github stars & 0 github forks
0 downloads in the last day
0 downloads in the last 30 days
66 total downloads