PHP code example of life2016 / yii2-webuploader

1. Go to this page and download the library: Download life2016/yii2-webuploader library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

life2016 / yii2-webuploader example snippets


<?= $form->field($model,'attributeName')->widget('yidashi\webuploader\MultipeWebuploader',['options'=>['boxId' => 'picker', 'previewWidth'=>200, 'previewHeight'=>150]]); 

<?= $form->field($model,'attributeName')->widget('yidashi\webuploader\Webuploader',['options'=>['boxId' => 'picker', 'previewWidth'=>200, 'previewHeight'=>150]]); 

public function actions()
{
    return [
        'webupload' => 'yidashi\webuploader\WebuploaderAction'
    ];
}

<?= $form->field($model,'attributeName')->widget('yidashi\webuploader\Webuploader',['server'=>'你自己的处理路由']);