2017 © Pedro Peláez
 

yii2-extension yii2-file

Yii2 module for file management

image

rmrevin/yii2-file

Yii2 module for file management

  • Wednesday, November 22, 2017
  • by rmrevin
  • Repository
  • 5 Watchers
  • 11 Stars
  • 251 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 12 Versions
  • 3 % Grown

The README.md

Yii 2 module for file management

License Latest Stable Version Latest Unstable Version Total Downloads, (*1)

Code Status

Scrutinizer Code Quality Code Coverage Travis CI Build Status Dependency Status, (*2)

Installation

Add in composer.json:, (*3)

{
    "require": {
        "rmrevin/yii2-file": "~1.1"
    }
}

Usage

In config, (*4)

<?
// ...

return [
    // ...
    'modules' => [
        // ...
        'file' => [
            'class' => '\rmrevin\yii\module\File\Module',
            'upload_alias' => '@app/web/upload',
            'upload_web_alias' => '/upload',
            'storage_alias' => '@app/web/storage',
            'storage_web_alias' => '/storage',
            'max_upload_file_size' => 10, // megabytes
        ],
    ],
];

Save file into database, (*5)

use rmrevin\yii\module\File;

// external resource
$File = File\models\File::push(new File\component\ExternalResource('https://www.google.ru/images/srpr/logo11w.png'));

// internal resource
$File = File\models\File::push(new File\component\InternalResource('/var/www/images/pick.png'));

// uploaded resource
$File = File\models\File::push(new File\component\UploadedResource(UploadedFile::getInstance($model, 'file')));

Manipulation with images, (*6)

use rmrevin\yii\module\File;

$File = File\models\File::find()->one();
echo Html::img((string)$File->image()
    ->resizeByWidth(100));
// available methods: resize, resizeByWidth, resizeByHeight, crop, thumbnail, watermark, text

The Versions

22/11 2017

dev-master

9999999-dev

Yii2 module for file management

  Sources   Download

MIT

The Requires

 

file upload yii

22/11 2017

1.2.5

1.2.5.0

Yii2 module for file management

  Sources   Download

MIT

The Requires

 

file upload yii

22/11 2017

1.2.4

1.2.4.0

Yii2 module for file management

  Sources   Download

MIT

The Requires

 

file upload yii

22/11 2017

1.2.3

1.2.3.0

Yii2 module for file management

  Sources   Download

MIT

The Requires

 

file upload yii

22/11 2017

1.2.2

1.2.2.0

Yii2 module for file management

  Sources   Download

MIT

The Requires

 

The Development Requires

file upload yii

22/11 2017

1.2.1

1.2.1.0

Yii2 module for file management

  Sources   Download

MIT

The Requires

 

The Development Requires

file upload yii

22/11 2017

1.2.0

1.2.0.0

Yii2 module for file management

  Sources   Download

MIT

The Requires

 

file upload yii

18/05 2015

1.1.0

1.1.0.0

Yii2 module for file management

  Sources   Download

MIT

The Requires

 

file upload yii

08/02 2015

1.0.3

1.0.3.0

Yii2 module for file management

  Sources   Download

MIT

The Requires

 

file upload yii

10/12 2014

1.0.2

1.0.2.0

Yii2 module for file management

  Sources   Download

MIT

The Requires

 

file upload yii

10/12 2014

1.0.1

1.0.1.0

Yii2 module for file management

  Sources   Download

MIT

The Requires

 

file upload yii

10/12 2014

1.0.0

1.0.0.0

Yii2 module for file management

  Sources   Download

MIT

The Requires

 

file upload yii