2017 © Pedro Peláez
 

yii2-extension yii2-dropzone

Yii2 Dropzone widget

image

andru19/yii2-dropzone

Yii2 Dropzone widget

  • Monday, May 30, 2016
  • by ANDRU19
  • Repository
  • 2 Watchers
  • 0 Stars
  • 1,618 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 2 % Grown

The README.md

Dropzone Extension for Yii 2

This extension provides the Dropzone integration for the Yii2 framework., (*1)

Installation

This extension requires Dropzone, (*2)

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

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

or add, (*5)

"andru19/yii2-dropzone": "*"

to the require section of your composer.json.

to the require section of your composer.json file., (*6)

Usage

Once the extension is installed, simply use it in your code by to create Ajax upload area :, (*7)

echo \andru\dropzone\DropZone::widget();

General Usage

```php, (*8)

use andru\dropzone\DropZone;, (*9)

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 ] ), (*10)

echo \andru\dropzone\DropZone::widget([ 'options' => [ 'maxFilesize' => '2', ], 'clientEvents' => [ 'complete' => "function(file){console.log(file)}", 'removedfile' => "function(file){alert(file.name + ' is removed')}" ], ]);, (*11)

you can also register andru\dropzone\UploadAction and andru\dropzone\RemoveAction actions in your controller, (*12)

The Versions

30/05 2016

dev-master

9999999-dev

Yii2 Dropzone widget

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Evgeny Dubovitsky

yii2 upload dropzone