Controller

public function actions() { return [ 'error' => [ 'class' => 'yii\web\ErrorAction', ], 'image-upload' => [ 'class' => 'vova07\imperavi\actions\UploadAction', 'url' => '/images/', // Directory URL address, where files are stored. 'path' => '@webroot/images/' // Or absolute path to directory where files are stored. ], 'images-get' => [ 'class' => 'vova07\imperavi\actions\GetAction', 'url' => '/images/blog/', // Directory URL address, where files are stored. 'path' => '@webroot/images/blog/', // Or absolute path to directory where files are stored. 'type' => '0', ], 'files-get' => [ 'class' => 'vova07\imperavi\actions\GetAction', 'url' => '/files/blog/', // Directory URL address, where files are stored. 'path' => '@webroot/files/blog/', // Or absolute path to directory where files are stored. 'type' => '1',//GetAction::TYPE_FILES, ], 'file-upload' => [ 'class' => 'vova07\imperavi\actions\UploadAction', 'url' => '/files/blog/', // Directory URL address, where files are stored. 'path' => '@webroot/files/blog/' // Or absolute path to directory where files are stored. ], ]; } 

_from.php

 <?= $form->field($model, 'description')->widget(Widget::classname(), [ 'settings' => [ 'lang' => 'ru', 'minHeight' => 300, 'pastePlainText' => true, 'buttonSource' => true, 'plugins' => [ 'clips', 'fullscreen' ], 'imageUpload' => '/images', 'imageManagerJson' => Url::to(['/blog/images-get']), ] ]);?> 

The following error occurs:

http: //newblog.local/images 404 (Not Found)

Created the images folder in the backend, frontend and even common in the hope that it will fly the picture somewhere in one of the three)

Settings cnc did on this guide

Widget vova07 / yii2-imperavi-widget

Closed due to the fact that off-topic participants PashaPash ♦ , Saidolim , Mstislav Pavlov , Vladimir Glinskikh , Aries 3 Oct '15 at 6:15 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - PashaPash, Saidolim, Mstislav Pavlov, Vladimir Glinskikh, Aries
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Give the problem code right in the question - PashaPash ♦

1 answer 1

 @webroot/images/ 

This implies that you must have an images folder in /frontend/web/ if you are running a frontend application.

Leave only the path parameters and create folders in the web directories.