2017 © Pedro Peláez
 

yii2-extension yii2-uploadable-file

Yii2 extension for upload files

image

maxmirazh33/yii2-uploadable-file

Yii2 extension for upload files

  • Thursday, October 1, 2015
  • by maxmirazh33
  • Repository
  • 2 Watchers
  • 2 Stars
  • 306 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

Yii2 uploadable file

Yii2 extension for upload files, (*1)

Latest Version Software License Quality Score Total Downloads, (*2)

Installation

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

Either run, (*4)

php composer.phar require --prefer-dist maxmirazh33/yii2-uploadable-file "*"

or add, (*5)

"maxmirazh33/yii2-uploadable-file": "*"

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

Usage

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

In your model:, (*8)

public function behaviors()
    {
        return [
            [
                'class' => \maxmirazh33\file\Behavior::className(),
                'savePathAlias' => '@web/files/',
                'urlPrefix' => '/files/',
                'attributes' => [
                    'image' => [
                        'savePathAlias' => '@web/images/',
                        'urlPrefix' => '/images/',
                    ],
                    'file',
                ],
            ],
        //other behaviors
        ];
    }

Use rules for validate attribute., (*9)

If your need perfectly file input, then in your view file:, (*10)

echo $form->field($model, 'file')->widget('maxmirazh33\file\Widget');

After, in your view:, (*11)

echo Html::a('myCoolFile', $model->getFileUrl('file'));

If you use Advanced App Template and this behavior attached in backend model, then in frontend model add trait, (*12)

use \maxmirazh33\file\GetFileUrlTrait

and use getFileUrl() method for frontend model too., (*13)

The Versions

01/10 2015

dev-master

9999999-dev https://github.com/maxmirazh33/yii2-uploadable-file

Yii2 extension for upload files

  Sources   Download

MIT

The Requires

 

extension yii2 file upload

01/10 2015

v2.2.1

2.2.1.0 https://github.com/maxmirazh33/yii2-uploadable-file

Yii2 extension for upload files

  Sources   Download

MIT

The Requires

 

extension yii2 file upload

10/03 2015

v2.2.0

2.2.0.0 https://github.com/maxmirazh33/yii2-uploadable-file

Yii2 extension for upload files

  Sources   Download

MIT

The Requires

 

extension yii2 file upload

26/02 2015

v2.1.1

2.1.1.0

Yii2 extension for upload files

  Sources   Download

MIT

The Requires

 

extension yii2 file upload

25/02 2015

v2.1.0

2.1.0.0

Yii2 extension for upload files

  Sources   Download

MIT

The Requires

 

extension yii2 file upload

19/02 2015

v2.0.1

2.0.1.0

Yii2 extension for upload files

  Sources   Download

MIT

The Requires

 

extension yii2 file upload

08/02 2015

v2.0.0

2.0.0.0

Yii2 extension for upload files

  Sources   Download

MIT

The Requires

 

extension yii2 file upload

07/02 2015

v1.0.0

1.0.0.0

Yii2 extension for upload files

  Sources   Download

MIT

The Requires

 

extension yii2 file upload