Vitek25 писал(а):vova07 писал(а):Vitek25 писал(а):спасибо за расширение.
При загрузки картинок столкнулся с вот такой бедой
http://joxi.ru/DmBPRwuNqvNBAP
вьюхаконтроллерКод: Выделить всё
->widget(Widget::className(), [ 'settings' => [ 'lang' => Yii::$app->language, 'minHeight' => 200, 'plugins' => [ 'imagemanager', ], 'imageUpload' => Url::toRoute(['static-page/image-upload']), 'imageManagerJson' => Url::toRoute(['static-page/images-get']), ], ])
Код: Выделить всё
public function actions() { $shopName = $this->shop->getShopName(); return [ 'image-upload' => [ 'class' => 'vova07\imperavi\actions\UploadAction', 'url' => '/uploads/shop_'.$shopName, // Directory URL address, where files are stored. 'path' => '@frontend/web/uploads/shop_'.$shopName, // Or absolute path to directory where files are stored. ], 'images-get' => [ 'class' => 'vova07\imperavi\actions\GetAction', 'url' => '/uploads/shop_'.$shopName, // Directory URL address, where files are stored. 'path' => '@frontend/web/uploads/shop_'.$shopName, // Or absolute path to directory where files are stored. 'type' => '\vova07\imperavi\actions\GetAction::TYPE_IMAGES', ], ]; }
Код: Выделить всё
...
'images-get' => [
...
'type' => \vova07\imperavi\actions\GetAction::TYPE_IMAGES,
],
...