2017 © Pedro Peláez
 

yii2-extension yii2-plupload

The plupload extension for the Yii framework

image

iadj/yii2-plupload

The plupload extension for the Yii framework

  • Monday, July 3, 2017
  • by iadj
  • Repository
  • 1 Watchers
  • 0 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 3 Versions
  • 5 % Grown

The README.md

yii2-plupload

A plupload extension for the Yii2 framework, (*1)

Installation

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

Either run, (*3)

php composer.phar require --prefer-dist iadj/yii2-plupload "*"

or add, (*4)

"iadj/yii2-plupload": "*"

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

Usage

Action

public function actions() {
    return [
        'upload' => [
            'class' => PluploadAction::className(),
            'onComplete' => function ($filename, $params) {
                // Do something with file
            }
        ],
    ];
}

Widget

<?= Plupload::widget([
    'url' => ['upload'],
    'browseLabel' => 'Upload',
    'browseOptions' => ['id' => 'browse', 'class' => 'btn btn-success'],
    'options' => [
        'filters' => [
            'mime_types' => [
                ['title' => 'Excel files', 'extensions' => 'csv,xls,xlsx'],
            ],
        ],
    ],
    'events' => [
        'FilesAdded' => 'function(uploader, files){
            $("#error-container").hide();
            $("#browse").button("loading");
            uploader.start();
        }',
        'FileUploaded' => 'function(uploader, file, response){
            $("#browse").button("reset");
        }',
        'Error' => 'function (uploader, error) {
            $("#error-container").html(error.message).show();
            $("#browse").button("reset");
        }'
    ],
]); ?>

The Versions

03/07 2017

dev-master

9999999-dev

The plupload extension for the Yii framework

  Sources   Download

MIT

The Requires

 

by Bound State Software
by Avatar iadj

yii2 plupload

11/08 2015

v0.0.2

0.0.2.0

The plupload extension for the Yii framework

  Sources   Download

MIT

The Requires

 

by Bound State Software

yii2 plupload

10/08 2015

v0.0.1

0.0.1.0

The plupload extension for the Yii framework

  Sources   Download

MIT

The Requires

 

by Bound State Software

yii2 plupload