Either run
php composer.phar require --prefer-dist skeeks/yii2-ajax-file-upload "*"
or add
"skeeks/yii2-ajax-file-upload": "*"
'modules' =>
[
'ajaxfileupload' => [
'class' => 'skeeks\yii2\ajaxfileupload\AjaxFileUploadModule',
'controllerMap' => [
'upload' => [
'class' => 'skeeks\yii2\ajaxfileupload\controllers\UploadController',
'private_tmp_dir' => '@runtime/ajaxfileupload',
]
]
]
]
'modules' =>
[
'ajaxfileupload' => [
'class' => 'skeeks\yii2\ajaxfileupload\AjaxFileUploadModule',
'controllerNamespace' => 'skeeks\yii2\ajaxfileupload\console\controllers'
'controllerMap' => [
'upload' => [
'class' => '\skeeks\yii2\ajaxfileupload\controllers\UploadController',
'private_tmp_dir' => '@runtime/ajaxfileupload',
]
]
]
]
php yii ajaxfileupload/cleanup
echo $form->field($model, 'image_src')->widget(
\skeeks\yii2\ajaxfileupload\widgets\AjaxFileUploadWidget::class,
[
'accept' => 'image/*',
//'view_file' => '@skeeks/yii2/ajaxfileupload/widgets/views/buttons',
//'itemOptions' => [
// 'class' => 'col-lg-6 col-md-6 col-sm-6 sx-file sx-state-success'
//]
]
);
SkeekS CMS (Yii2) — quickly, easily and effectively!
skeeks.com | cms.skeeks.com