https://github.com/devgroup-ru/yii2-dropzone
This extension provides the Dropzone integration for the Yii2 framework.
https://github.com/devgroup-ru/yii2-dropzone
drag-and-drop dropzone dropzonejs file-upload fileupload php upload yii2 yii2-framework yii2-widgets
Last synced: 9 months ago
JSON representation
This extension provides the Dropzone integration for the Yii2 framework.
- Host: GitHub
- URL: https://github.com/devgroup-ru/yii2-dropzone
- Owner: DevGroup-ru
- License: gpl-3.0
- Created: 2014-12-02T08:26:19.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-03-29T11:48:37.000Z (about 10 years ago)
- Last Synced: 2025-09-17T14:26:25.913Z (9 months ago)
- Topics: drag-and-drop, dropzone, dropzonejs, file-upload, fileupload, php, upload, yii2, yii2-framework, yii2-widgets
- Language: PHP
- Homepage:
- Size: 21.5 KB
- Stars: 10
- Watchers: 19
- Forks: 13
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Dropzone Extension for Yii 2
==============================
This extension provides the [Dropzone](http://www.dropzonejs.com/) integration for the Yii2 framework.
Installation
------------
This extension requires [Dropzone](https://github.com/enyo/dropzone)
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist devgroup/yii2-dropzone "*"
```
or add
```
"devgroup/yii2-dropzone": "*"
```
to the require section of your composer.json.
General Usage
-------------
```php
use devgroup\dropzone\DropZone;
DropZone::widget(
[
'name' => 'file', // input name or 'model' and 'attribute'
'url' => '', // upload url
'storedFiles' => [], // stores files
'eventHandlers' => [], // dropzone event handlers
'sortable' => true, // sortable flag
'sortableOptions' => [], // sortable options
'htmlOptions' => [], // container html options
'options' => [], // dropzone js options
]
)
```
you can also register `devgroup\dropzone\UploadAction` and `devgroup\dropzone\RemoveAction` actions in your controller