simialbi / yii2-widget-dropzone
Yii2 Dropzone widget
Installs: 223
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 13
Type:yii2-extension
Requires
- php: >=7.4
- enyo/dropzone: ^5.0.0
- yiisoft/yii2: ^2.0.0
Requires (Dev)
- yiisoft/yii2-coding-standards: ^2.0.0
- yiisoft/yii2-debug: 2.0.*
This package is auto-updated.
Last update: 2024-10-26 16:31:14 UTC
README
This extension provides the Dropzone integration for the Yii2 framework.
This fork is based on @DevGroup-ru's extension yii2-dropzone.
Installation
This extension requires Dropzone
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist simialbi/yii2-widget-dropzone "*"
or add
"simialbi/yii2-widget-dropzone": "*"
to the require section of your composer.json.
General Usage
use simialbi\yii2\dropzone\DropZone; DropZone::widget( [ 'name' => 'file', // input name or 'model' and 'attribute' 'url' => '', // upload url 'storedFiles' => [], // stores files 'clientOptions' => [], // dropzone js options 'clientEvents' => [], // dropzone event handlers 'options' => [] // container html options ] )
you can also register simialbi\yii2\dropzone\UploadAction
and simialbi\yii2\dropzone\RemoveAction
actions in your controller