Answer the question
In order to leave comments, you need to log in
Why do I get a 404 error when trying to upload an image using the elfinder plugin?
Installed ckeditor and elfinder plugins on yii2 advanced. I get a 404 error when I try to upload an image.
main.php
'controllerMap' => [
'class' => 'mihaildev\elfinder\PathController',
'elfinder' => [
'access' => ['@'],
'root' => [
'baseUrl'=>'/web',
// 'basePath'=>'@webroot',
'path' => 'upload/global',
'name' => 'Global'
],
]
],
<? echo $form->field($model, 'description')->widget(CKEditor::className(), [
'editorOptions' => ElFinder::ckeditorOptions('elfinder', []),
]); ?>
Answer the question
In order to leave comments, you need to log in
You made the wrong settings) It's obvious. Controller class placed above action in controllerMap
'controllerMap' => [
'elfinder' => [
'class' => 'mihaildev\elfinder\PathController', /////ВОТ ЗДЕСЬ ДОЛЖНО БЫТЬ!
'access' => ['@'],
'root' => [
'baseUrl'=>'/web',
// 'basePath'=>'@webroot',
'path' => 'upload/global',
'name' => 'Global'
],
]
],
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question