2017 © Pedro Peláez
 

yii2-extension yii2-fileupload-action

use in controller

image

osenyursa/yii2-fileupload-action

use in controller

  • Friday, January 26, 2018
  • by osenyursa
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 17 % Grown

The README.md

Yii2-FileUpload

use in controller, (*1)

Installation

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

Either run, (*3)

php composer.phar require --prefer-dist osenyursa/yii2-fileupload-action "0.1.0"

or add, (*4)

"osenyursa/yii2-fileupload-action": "0.1.0"

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

Usage

Once the extension is installed, simply use it in your code by :, (*6)

// in controller
class FileController extends Controller
{
    public function actions()
    {
        return [
            'ajax-upload' => [
                'class' => UploadAction::className(),
                'rules' => ['skipOnEmpty' => false, 'maxFiles' => 4],
                'name' => 'cover',
                'savePath' => 'upload/' . date('Y-m-d') . '/',
            ]
        ];
    }

    public function actionUpload()
    {
        return $this->render('upload');
    }
}

The Versions

26/01 2018

dev-master

9999999-dev

use in controller

  Sources   Download

BSD-3-Clause

The Requires

 

by zhang jingxian

extension yii2 fileupload

26/01 2018

0.1.0

0.1.0.0

use in controller

  Sources   Download

BSD-3-Clause

The Requires

 

by zhang jingxian

extension yii2 fileupload