zainiafzan / yii2-dropzone
Dropzone Js for Yii2 Widget
Package info
github.com/zainiafzan/yii2-dropzone
Type:yii2-extension
pkg:composer/zainiafzan/yii2-dropzone
dev-master
2014-03-13 22:12 UTC
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2026-03-14 22:34:03 UTC
README
Dropzone Js for Yii2 Widget
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist zainiafzan/yii2-dropzone "*"
or add
"zainiafzan/yii2-dropzone": "*"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply use it in your code by :
<?= \zainiafzan\widget\Dropzone::widget([ 'options' => [ 'addRemoveLinks' => true, ], 'clientEvents' => [ 'complete' => "function(file){console.log(file)}", 'removedfile' => "function(file){alert(file.name + ' is removed')}", 'sending' => "function(file, xhr, formData){formData.append('".Yii::$app->request->csrfParam."','".Yii::$app->request->getCsrfToken() ."')}" ] ])?>```