Download the PHP package grandmasterx/yii2-file-kit without Composer

On this page you can find all versions of the php package grandmasterx/yii2-file-kit. 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-file-kit

[Packagist]() Dependency Status

This kit is designed to automate routine processes of uploading files, their saving and storage. It includes:

Here you can see list of available filesystem adapters

Demo

Since file kit is a part of yii2-starter-kit it's demo can be found in starter kit demo here.

Installation

The preferred way to install this extension is through composer.

Either run

or add

to the require section of your composer.json file.

File Storage

To work with the File Kit you need to configure FileStorage first. This component is a layer of abstraction over the filesystem

There are several ways to configure grandmasterx\filekit\Storage to work with flysystem.

Using Closure

Using filesystem builder

Read more about flysystem at http://flysystem.thephpleague.com/

Using third-party extensions

Actions

File Kit contains several Actions to work with uploads.

Upload Action

Designed to save the file uploaded by the widget

See additional settings in the corresponding class

Delete Action

See additional settings in the corresponding class

View (Download) Action

See additional settings in the corresponding class

Upload Widget

Standalone usage

With ActiveForm

Upload Widget events

Upload widget trigger some of built-in blueimp events:

You can use them directly or add your custom handlers in options:

UploadBehavior

This behavior is designed to save uploaded files in the corresponding relation.

Somewhere in model:

For multiple files

For single file upload

See additional settings in the corresponding class.

Validation

There are two ways you can perform validation over uploads. On the client side validation is performed by Blueimp File Upload. Here is documentation about available options.

On the server side validation is performed by [[yii\web\UploadAction]], where you can configure validation rules for [[yii\base\DynamicModel]] that will be used in validation process

Tips

Adding watermark

Install intervention/image library

Edit your upload actions as so


All versions of yii2-file-kit with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version ^2.0.0
yiisoft/yii2-jui Version ^2.0.0
league/flysystem Version ^1.0
bower-asset/blueimp-file-upload Version ^9.7.0
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 grandmasterx/yii2-file-kit contains the following files

Loading the files please wait ....