2017 © Pedro Peláez
 

yii2-extension yii2-plupload

Yii2 Plupload Widget

image

emnabs/yii2-plupload

Yii2 Plupload Widget

  • Thursday, November 9, 2017
  • by emnabs
  • Repository
  • 1 Watchers
  • 0 Stars
  • 44 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 12 Versions
  • 2 % Grown

The README.md

Yii2 Plupload Widget

yii2-plupload is a widget based plupload solution for Yii2. It is released under the BSD 3-Clause license., (*1)

Latest Stable Version Total Downloads License, (*2)

Installation

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

Either run, (*4)

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

or add, (*5)

"emnabs/yii2-plupload": "*"

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

Usage

To use this widget, you have to add the code in your viewer page:, (*7)

Usage With ActiveForm and model, (*8)

use emhome\plupload\Plupload;

echo $form->field($model, 'thumb')->widget(Plupload::classname(), [
    'url' => ['upload'],
    //'wrapperOptions' => ['width' => 200, 'height' => 200],
    //'resize' => ['width' => 200, 'height' => 200],
    'autoUpload' => true,
    'options' => [
        'filters' => [
            'mime_types' => [
                [
                    'title' => "Image files",
                    'extensions' => "jpg,gif,png"
                ],
            ]
        ],
    ],
]);

Usage Without ActiveForm model, (*9)

use emhome\plupload\Plupload;

Plupload::widget([
    'url' => ['upload'],
    'browseLabel' => '上传文件',
    'autoUpload' => true,
    'errorContainer' => 'errorUpload',
    'options' => [
        'filters' => [
            'max_file_size' => '20kb',
            'mime_types' => [
                [
                    'title' => "Image files",
                    'extensions' => "jpg,gif,png"
                ],
            ]
        ],
    ],
    'events' => [],
]);

Usage actions with PluploadAction, (*10)

public function actions()
{
    return [
    ...
        'plupload' => [
        'class' => 'emhome\plupload\PluploadAction',
        'onComplete' => function($file, $params) {
            //上传完成后操作
        ...
            return [
                'file' => $file,
                'params' => $params
            ];
        },
    ],
    ...
    ];
}

License

yii2-plupload is released under the BSD 3-Clause License. See the bundled LICENSE.md for details., (*11)

Plupload

Copyright 2016, Ephox
Released under GPLv2 License, (*12)

The Versions

09/11 2017

dev-master

9999999-dev https://github.com/emnabs/yii2-plupload

Yii2 Plupload Widget

  Sources   Download

BSD 3-Clause

The Requires

 

by emhome

extension yii2 plupload

09/11 2017

1.2.3

1.2.3.0 https://github.com/emnabs/yii2-plupload

Yii2 Plupload Widget

  Sources   Download

BSD 3-Clause

The Requires

 

by emhome

extension yii2 plupload

08/11 2017

1.2.1

1.2.1.0 https://github.com/emnabs/yii2-plupload

Yii2 Plupload Widget

  Sources   Download

BSD 3-Clause

The Requires

 

by emhome

extension yii2 plupload

08/11 2017

1.2.2

1.2.2.0 https://github.com/emnabs/yii2-plupload

Yii2 Plupload Widget

  Sources   Download

BSD 3-Clause

The Requires

 

by emhome

extension yii2 plupload

08/11 2017

1.2.0

1.2.0.0 https://github.com/emnabs/yii2-plupload

Yii2 Plupload Widget

  Sources   Download

BSD 3-Clause

The Requires

 

by emhome

extension yii2 plupload

07/11 2017

1.1.2

1.1.2.0 https://github.com/emnabs/yii2-plupload

Yii2 Plupload Widget

  Sources   Download

BSD 3-Clause

The Requires

 

by emhome

extension yii2 plupload

06/11 2017

1.1.1

1.1.1.0 https://github.com/emnabs/yii2-plupload

Yii2 Plupload Widget

  Sources   Download

BSD 3-Clause

The Requires

 

by emhome

extension yii2 plupload

15/06 2017

1.1.0

1.1.0.0 https://github.com/emnabs/yii2-plupload

Yii2 Plupload Widget

  Sources   Download

BSD 3-Clause

The Requires

 

by emhome

extension yii2 plupload

15/06 2017

1.0.3

1.0.3.0 https://github.com/emnabs/yii2-plupload

Yii2 Plupload Widget

  Sources   Download

BSD 3-Clause

The Requires

 

by emhome

extension yii2 plupload

14/06 2017

1.0.2

1.0.2.0 https://github.com/emnabs/yii2-plupload

Yii2 Plupload Widget

  Sources   Download

BSD 3-Clause

The Requires

 

by emhome

extension yii2 plupload

14/06 2017

1.0.0

1.0.0.0 https://github.com/emnabs/yii2-plupload

Yii2 Plupload Widget

  Sources   Download

BSD 3-Clause

The Requires

 

by emhome

extension yii2 plupload

14/06 2017

1.0.1

1.0.1.0 https://github.com/emnabs/yii2-plupload

Yii2 Plupload Widget

  Sources   Download

BSD 3-Clause

The Requires

 

by emhome

extension yii2 plupload