Skip to content

This extension provides the Dropzone integration for the Yii2 framework.

License

Notifications You must be signed in to change notification settings

bestyii/yii2-dropzone

 
 

Repository files navigation

Dropzone Extension for Yii 2

This extension provides the Dropzone integration for the Yii2 framework.

Installation

This extension requires Dropzone

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist bestyii/yii2-dropzone "*"

or add

"bestyii/yii2-dropzone": "*"

to the require section of your composer.json.

General Usage

use bestyii\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 bestyii\dropzone\UploadAction and bestyii\dropzone\RemoveAction actions in your controller

About

This extension provides the Dropzone integration for the Yii2 framework.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%