Answer the question
In order to leave comments, you need to log in
Yii2 Elfinder http 500 error?
Put https://github.com/MihailDev/yii2-elfinder along with https://github.com/MihailDev/yii2-ckeditor here is the config
'controllerMap' => [
'elfinder' => [
'class' => 'mihaildev\elfinder\Controller',
'access' => ['@'], //глобальный доступ к фаил менеджеру @ - для авторизорованных , ? - для гостей , чтоб открыть всем ['@', '?']
'disabledCommands' => ['netmount'], //отключение ненужных команд https://github.com/Studio-42/elFinder/wiki/Client-configuration-options#commands
'roots' => [
[
'baseUrl'=>'@web',
'basePath'=>'@frontend/web/upload/global',
'path' => 'files/global',
'name' => 'Global'
],
[
'class' => 'mihaildev\elfinder\volume\UserPath',
'path' => 'files/user_{id}',
'name' => 'My Documents'
],
[
'path' => 'files/some',
'name' => ['category' => 'my','message' => 'Some Name'] //перевод Yii::t($category, $message)
],
[
'path' => 'files/some',
'name' => ['category' => 'my','message' => 'Some Name'], // Yii::t($category, $message)
'access' => ['read' => '*', 'write' => 'UserFilesAccess'] // * - для всех, иначе проверка доступа в даааном примере все могут видет а редактировать могут пользователи только с правами UserFilesAccess
]
],
// 'watermark' => [
// 'source' => __DIR__.'/logo.png', // Path to Water mark image
// 'marginRight' => 5, // Margin right pixel
// 'marginBottom' => 5, // Margin bottom pixel
// 'quality' => 95, // JPEG image save quality
// 'transparency' => 70, // Water mark image transparency ( other than PNG )
// 'targetType' => IMG_GIF|IMG_JPG|IMG_PNG|IMG_WBMP, // Target image formats ( bit-field )
//'targetMinPixel' => 200 // Target image minimum pixel size
// ]
]
],
http://www.backend.tests.dev/elfinder/connect?_csrf-backend=X1VMM2RTRHMuIBxnVAsHHw9sBx4mIy5FNz8CXQYWITdnMh5hESkRMQ%3D%3D&mimes%5B%5D=image&cmd=open&target=&init=1&tree=1&_=149131893056
Answer the question
In order to leave comments, you need to log in
In my case, inheritance was from Object, which was invalid as of PHP 7.2, and was replaced by BaseObject after 2.0.13.
Just changing
on the
SomeClass extends yii\base\BaseObject
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question