iutbay / yii2-kcfinder

KCFinder for Yii2
22 stars 19 forks source link

Session Option #11

Open hendrasyp opened 8 years ago

hendrasyp commented 8 years ago

Where do I have to place this code ?

// kcfinder options
// http://kcfinder.sunhater.com/install#dynamic
$kcfOptions = array_merge(KCFinder::$kcfDefaultOptions, [
    'uploadURL' => Yii::getAlias('@web').'/upload',
    'access' => [
        'files' => [
            'upload' => true,
            'delete' => false,
            'copy' => false,
            'move' => false,
            'rename' => false,
        ],
        'dirs' => [
            'create' => true,
            'delete' => false,
            'rename' => false,
        ],
    ],
]);

// Set kcfinder session options
Yii::$app->session->set('KCFINDER', $kcfOptions);

controller ? view ? or where else ?

NabiKAZ commented 8 years ago

@hendrasyp I thinks naturally it be in controller better.

@iutbay Why don't move this code in core extension? and allow user to set that params when use of widget.