Skip to content

alexgivi/yii2-plupload-widget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yii2-plupload

Plupload Widget for Yii2 uses moxiecode/plupload

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

"alexgivi/yii2-plupload-widget": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?= \alexgivi\plupload\Plupload::widget([
    'url' => ['controller/test-upload'],
]); ?>

In the controller:

class Controller extends yii\web\Controller
{
	public function actionTestUpload()
	{
		$file = UploadedFile::getInstanceByName('file');
		// perform file save.
	}
}