Download the PHP package deanar/yii2-file-processor without Composer
On this page you can find all versions of the php package deanar/yii2-file-processor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii2-file-processor
File Processor (Yii2 Extension)
Upload and process files and images.
Based on jquery.fileapi Link to github
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file and update composer dependencies;
If installation fails, try to use minimum stability: dev.
Then run migrations
Include module into your web config
Attach behavior to your model
Create file file_processor_variations.php
in config directory and configure image variations like:
NB! Don't forget to disable php execution in your upload dir.
For example: If you use Apache web server, you can create .htaccess
file in the root of upload directory with the following code inside:
Upgrade instruction
Run migrations
In ConnectFileSequence behaviour replace deleteTypes
property to registeredTypes
.
Usage
Once the extension is installed, simply use it in your form by adding widget code to view:
Multi upload widget:
Single upload widget:
If preview
is set to false
, crop
automatically set to false
and will be very simple upload widget.
If crop set to true
, accept
option automatically set to 'image/*'
.
For single upload without crop, autoUpload
automatically set to true
.
To setup size of window and minimum size of crop area use previewSize
property. Default is [200,200]
.
imageAutoOrientation
option is set to false
by default
You can access your images\files by:
You can filter files like this:
You can fetch first file in the row:
You can display your images\files in the GridView
.
Add in the column list:
You can display list of your images\files anywhere else via DisplayWidget
, e.g. in DetailView
widget or just in the view.
Case with DetailView
:
All properties of DisplayWidget are required.
TODOs and progress
- Special widget for single file uploads [*****]
- Access control system [*****]
- Internationalization (EN + RU) [*****]
- More customization [**---]
- Crop and other features of jquery.fileapi [****-]
- API for upload files by url or by path [-----]
- Console commands for generating new image variations [-----]
- Admin interface for viewing and editing all uploaded files [-----]
- Mode for generating image variations on the fly (by request) [-----]
- Mode for generating image variations in background [-----]
- Advanced variation features: watermarks, cropping, rotation etc. [***--]
- Beautiful alerts (e.g. http://rubaxa.github.io/Ply/) [-----]
- Refactoring [*----]
Changelog
=======
0.1.4 (2016-06-05)
- Turkish language support (Thanks to https://github.com/fg)
0.1.3 (2016-05-19)
- Possibility to save models in console
0.1.2 (2015-08-18)
- Bug: Several single-upload widgets with crop
- Bug: Removing image preview in single-upload widget on delete
0.1.1 (2015-07-16)
imageAutoOrientation
option is set tofalse
by default
0.1.0 (2015-03-10)
- First tagged version.
All versions of yii2-file-processor with dependencies
yiisoft/yii2 Version *
rubaxa/fileapi Version *
bower-asset/jcrop Version *
yiisoft/yii2-imagine Version *