2017 © Pedro Peláez
 

yii2-extension yii2-webuploader

yii2-webuploader

image

xinyeweb/yii2-webuploader

yii2-webuploader

  • Wednesday, January 3, 2018
  • by hotarzhang
  • Repository
  • 2 Watchers
  • 1 Stars
  • 15 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 15 % Grown

The README.md

yii2-webuploader

yii2-webuploader 組件。, (*1)

Installation

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

Either run, (*3)

php composer.phar require --prefer-dist xinyeweb/yii2-webuploader "dev-master"

or add, (*4)

"xinyeweb/yii2-webuploader": "dev-master"

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

Usage

單圖使用 :, (*6)

<?= \xinyeweb\webuploader\WebUploader::className(); ?>

多圖使用 :, (*7)

<?= 
    $form->field($model, 'pics')->widget(\xinyeweb\webuploader\WebUploader::className(),[
        'clientOptions' => [
            'pick' => [
                'multiple' => true,
            ],
        ]
    ]) ?>

Controller 中配置上傳 :, (*8)

    public function actions() {
        return ArrayHelper::merge(parent::actions(), [
            'upload' => [
                'class' => '\xinyeweb\webuploader\WebUploaderAction',
            ],
        ]);
    }

高級版 上傳目錄, (*9)

    Yii::setAlias('@upload', dirname(dirname(__DIR__)) . '/web/uploads'); //存储目录path

基礎版 上傳目錄 入口文件, (*10)

    Yii::setAlias('@upload', __DIR__ . '/uploads'); //存储目录path

The Versions

03/01 2018

dev-master

9999999-dev

yii2-webuploader

  Sources   Download

BSD-3-Clause

The Requires

 

by hoter

extension yii2