{"id":18860171,"url":"https://github.com/bilginnet/yii2-plupload","last_synced_at":"2026-04-28T21:32:23.107Z","repository":{"id":62494227,"uuid":"107119214","full_name":"bilginnet/yii2-plupload","owner":"bilginnet","description":"Yii2 Plupload queue widget","archived":false,"fork":false,"pushed_at":"2018-11-06T12:34:17.000Z","size":343,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-28T15:31:02.716Z","etag":null,"topics":["uploader","yii2-extension","yii2-plupload","yii2-widgets"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bilginnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-16T11:36:34.000Z","updated_at":"2018-11-06T12:25:02.000Z","dependencies_parsed_at":"2022-11-02T11:17:44.259Z","dependency_job_id":null,"html_url":"https://github.com/bilginnet/yii2-plupload","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bilginnet/yii2-plupload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilginnet%2Fyii2-plupload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilginnet%2Fyii2-plupload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilginnet%2Fyii2-plupload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilginnet%2Fyii2-plupload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bilginnet","download_url":"https://codeload.github.com/bilginnet/yii2-plupload/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilginnet%2Fyii2-plupload/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32400861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["uploader","yii2-extension","yii2-plupload","yii2-widgets"],"created_at":"2024-11-08T04:22:01.520Z","updated_at":"2026-04-28T21:32:23.091Z","avatar_url":"https://github.com/bilginnet.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yii2-plupload\nYii2 Plupload queue widget\n\n[![Minimum PHP Version](http://img.shields.io/badge/php-%3E%3D%205.4-8892BF.svg)](https://php.net/)\n[![Latest Stable Version](https://poser.pugx.org/bilginnet/yii2-plupload/v/stable)](https://packagist.org/packages/bilginnet/yii2-plupload)\n[![Total Downloads](https://poser.pugx.org/bilginnet/yii2-plupload/downloads)](https://packagist.org/packages/bilginnet/yii2-plupload)\n[![Latest Unstable Version](https://poser.pugx.org/bilginnet/yii2-plupload/v/unstable)](https://packagist.org/packages/bilginnet/yii2-plupload)\n[![License](https://poser.pugx.org/bilginnet/yii2-plupload/license)](https://packagist.org/packages/bilginnet/yii2-parpluploadser)\n\nInstallation\n------------\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n```\nphp composer.phar require --prefer-dist bilginnet/yii2-plupload \"dev-master\"\n```\n\nor add\n\n```\n\"bilginnet/yii2-plupload\": \"dev-master\"\n```\nto the require section of your `composer.json` file.\n\n\nUsage\n-----\n\nLet's add in controller file\n````php\npublic function actions() {\n    return [\n        'plupload' =\u003e [\n            'class' =\u003e \\bilginnet\\plupload\\PluploadAction::className(),\n            // upload path from alias - default is '@webroot/uploads' or set your alias path sample: '@yourpath'\n            // set your alias into config in your main-local config file before return[]\n            // Yii::setAlias('@yourpath', '@webroot/uploads/'); \n            'targetDir' =\u003e '@webroot/uploads',\n            'uploadComplete' =\u003e function ($filePath, $params) {\n                // Do something with file\n            }\n        ],\n    ];\n}\n````\n\nLet's add in your _form file\n````php\n\u003c?= \\bilginnet\\plupload\\Plupload::widget([\n    'url' =\u003e ['plupload'], // sync url name to action name in controller actions\n    \n    // optional unique name of uploader\n    // will set automatically if not set\n    'uploader' =\u003e $uploaderName = uniqid('uploader_'),\n    \n    // auto start when files selected default true\n    // you can set false this if you want to start uploader when form submitting\n    /* \n    sample: \n    $('button[type=\"submit\"]').click(function(event) {\n        \n        var _form = $('form');\n        \n        // ajax form validate\n        $.ajax({\n            type: 'post',\n            url: 'ajaxValidateActionUrl', // set your url\n            data: _form.serializeArray()\n        }).done(function(data) {            \n            if (data === 'true') {\n                // ajax validate is true\n            \n                var myUploader = \u003c?= $uploaderName ?\u003e;\n                myUploader.bind(\"UploadComplete\", function(uploader, files) {\n                    // do something\n                    \n                    _form.submit();\n                });\n                myUploader.start();\n                        \n            } else {\n                // ajax validate is false\n                _form.submit();\n            }\n        });\n    });\n    // in controller ajaxValidateAction\n    public function actionAjaxValidate() {\n        $model = new Model();\n        if (Yii::$app-\u003erequest-\u003eisAjax \u0026\u0026 $model-\u003eload(Yii::$app-\u003erequest-\u003epost())) {\n            if ($model-\u003evalidate()) {\n                print_r('true');\n            } else {\n                print_r('false');\n            }\n        }    \n    }\n    */\n    'startOnSelect' =\u003e true\n    \n    'browseLabel' =\u003e 'Upload',\n    'browseOptions' =\u003e ['id' =\u003e 'browse', 'class' =\u003e 'btn btn-success'],\n    'options' =\u003e [\n        'multi_selection' =\u003e false, // set true for multiple files\n        'filters' =\u003e [\n            'mime_types' =\u003e [\n                ['title' =\u003e 'Image files', 'extensions' =\u003e 'jpg,jpeg,png,gif'],                \n            ],\n        ],\n    ],\n    'events' =\u003e [\n        'FilesAdded' =\u003e 'function(uploader, files){                            \n            $(\"#browse\").button(\"loading\");\n        }',\n        'FileUploaded' =\u003e 'function(uploader, file, response){\n            $(\"#browse\").button(\"reset\");\n        }',\n        'Error' =\u003e 'function (uploader, error) {                            \n            $(\"#browse\").button(\"reset\");\n        }'\n    ],\n]); ?\u003e\n````\n\nPlease refer to the Plupload documentation: http://www.plupload.com/docs/v2/pluploadQueue\n\n\nNotes\n-----\nYou can use multiple widgets in 1 file \nsample:\n````php\n\u003c?= \\bilginnet\\plupload\\Plupload::widget($options1); ?\u003e\n\u003c?= \\bilginnet\\plupload\\Plupload::widget($options2); ?\u003e\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilginnet%2Fyii2-plupload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbilginnet%2Fyii2-plupload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilginnet%2Fyii2-plupload/lists"}