skeeks / yii2-ajax-file-upload
Yii2 files upload
Installs: 4 395
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Language:JavaScript
Type:yii2-extension
Requires
- skeeks/yii2-sx: ^1.3
- yiisoft/yii2: ^2.0
- yiisoft/yii2-httpclient: ^2.0
This package is auto-updated.
Last update: 2024-12-05 08:24:54 UTC
README
Installation
Either run
php composer.phar require --prefer-dist skeeks/yii2-ajax-file-upload "*"
or add
"skeeks/yii2-ajax-file-upload": "*"
Configuration web app
'modules' => [ 'ajaxfileupload' => [ 'class' => 'skeeks\yii2\ajaxfileupload\AjaxFileUploadModule', 'controllerMap' => [ 'upload' => [ 'class' => 'skeeks\yii2\ajaxfileupload\controllers\UploadController', 'private_tmp_dir' => '@runtime/ajaxfileupload', ] ] ] ]
Configuration console app
'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', ] ] ] ]
Console commands
php yii ajaxfileupload/cleanup
Usage
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' //] ] );
Links
SkeekS CMS (Yii2) — quickly, easily and effectively!
skeeks.com | cms.skeeks.com