Download the PHP package coderius/yii2-upload-file-behavior without Composer

On this page you can find all versions of the php package coderius/yii2-upload-file-behavior. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-upload-file-behavior

Yii2 upload file behavior

Latest Version Code Coverage Code Intelligence Status Code Quality Build Status Total Downloads

About

Yii2 upload file behavior - simple wey to upload images and files to server. No need anymore wrote tonn of code in controller and else testing it by houers. As a result - saving time and labor costs for uploading files to the site. Only needed upload extention from github and past some less code to model class (\yii\db\ActiveRecord) where needed hendler uploading files. More on this below.

Installation

The preferred way to install this extension is through composer.

First download extention. Run the command in the terminal:

or add in composer.json

and run composer update

Usage

This extention created for usage in \yii\db\ActiveRecord model classes.

Configyration behavior.

This extention created for usage in \yii\db\ActiveRecord model classes.

!Note. Don't forget to include the dependency namespaces.

Example

Short simple config:

In this case allowed params is: 'size' & 'quality'.

Additional actions:

  1. Create aliases to target folders for saving uploaded files.
  2. Create target folders in 'frontend/web' dirrectory like example.
  3. Don't forget create vertual attribute. If it named like '$file', then no need set config to 'nameOfAttributeFile'(default = (string)'file').

Testing

Run tests in extention folder.

Note! For running all tests needed upload all dependencies by composer. If tested single extention, then run command from root directory where located extention:

When all dependencies downloaded run all tests in terminal from root folder:

Or for only unit:

If extention tested in app, then set correct path to phpunit and run some commands.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of yii2-upload-file-behavior with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
yiisoft/yii2 Version ^2.0.0
yiisoft/yii2-imagine Version ^2.2
mockery/mockery Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package coderius/yii2-upload-file-behavior contains the following files

Loading the files please wait ....