Yii 2.0: yii2-jquery-fileupload-widget

Blueimp jquery file upload widget for Yii2
1 follower

Yii2 port of BlueImp jQuery File Upload plugin. File Upload widget with multiple file selection, drag&drop support, progress bars, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads and client-side image resizing.

One widget, simple configuration, everything works out of the box.


Yii 2.0 or above


Add to your composer.json

"require": {
    "limion/yii2-jquery-fileupload-widget": "~1.0"


UI version

See: https://blueimp.github.io/jQuery-File-Upload/index.html
Please note, in case of using a "UI" version you need to embed the widget to an existing form.

use limion\jqueryfileupload\JQueryFileUpload;
<?php $form = ActiveForm::begin(); ?>
<?= JQueryFileUpload::widget([
        'name' => 'files[]',
        'url' => ['upload', 'someparam' => 'somevalue'], // your route for saving images,
        'appearance'=>'ui', // available values: 'ui','plus' or 'basic'
        'options' => [
            'accept' => 'image/*'
        'clientOptions' => [
            'maxFileSize' => 2000000,
            'dataType' => 'json',
            'acceptFileTypes'=>new yii\web\JsExpression('/(\.|\/)(gif|jpe?g|png)$/i'),
<?php ActiveForm::end(); ?>


More information and examples see on GitHub: https://github.com/limion/yii2-jquery-fileupload-widget

Be the first person to leave a comment

Please to leave your comment.

Create extension
No downloadable files yet