All Projects → vova07 → yii2-fileapi-widget

vova07 / yii2-fileapi-widget

Licence: other
Yii2 FileAPI widget.

Programming Languages

PHP
23972 projects - #3 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to yii2-fileapi-widget

yii2-sweet-submit
sweet sumit using sweetalert
Stars: ✭ 26 (-49.02%)
Mutual labels:  yii2, yii2-extension, yii2-widgets
yii2-lock-form
disable the button when form submit
Stars: ✭ 37 (-27.45%)
Mutual labels:  yii2, yii2-extension, yii2-widgets
yii2-dropzone
This extension provides the Dropzone integration for the Yii2 framework.
Stars: ✭ 11 (-78.43%)
Mutual labels:  yii2, file-upload, yii2-widgets
yii2-pgsql
Improved PostgreSQL schemas for Yii2
Stars: ✭ 34 (-33.33%)
Mutual labels:  yii2, yii2-extension
ar-search
Provides unified search model for Yii ActiveRecord
Stars: ✭ 31 (-39.22%)
Mutual labels:  yii2, yii2-extension
yii2-cashier
Yii2 Cashier provides an interface to Stripe's subscription billing services.
Stars: ✭ 43 (-15.69%)
Mutual labels:  yii2, yii2-extension
yii2-translatable
Translatable behavior aggregates logic of linking translations to the primary model
Stars: ✭ 15 (-70.59%)
Mutual labels:  yii2, yii2-extension
yii2-querybuilder
Extension for Yii2 Framework to work with jQuery QueryBuilder
Stars: ✭ 41 (-19.61%)
Mutual labels:  yii2, yii2-widgets
yii2-jwt-tools
An easy way to configure JWT authentication and validation on Yii Framework 2 Projects
Stars: ✭ 22 (-56.86%)
Mutual labels:  yii2, yii2-extension
yii2-linkable-behavior
Yii2 behavior to help creating urls easier
Stars: ✭ 12 (-76.47%)
Mutual labels:  yii2, yii2-extension
yii2-ion-slider
Easily customizable range slider with skins support.
Stars: ✭ 21 (-58.82%)
Mutual labels:  yii2, yii2-extension
yii2-vote
Provides voting for any model 👍 👎
Stars: ✭ 70 (+37.25%)
Mutual labels:  yii2, yii2-extension
yii2-elasticsearch
Elasticsearch client based on official Elasticsearch PHP library
Stars: ✭ 14 (-72.55%)
Mutual labels:  yii2, yii2-extension
yii2-newsletter
Module for saving user contacts from newsletter form to database
Stars: ✭ 17 (-66.67%)
Mutual labels:  yii2, yii2-extension
behavior-trait
Allows handling events via inline declared methods, which can be added by traits
Stars: ✭ 18 (-64.71%)
Mutual labels:  yii2, yii2-extension
yii2-stat
Yii2 Multi Web Statistic Module (yametrika, google-analytic, own db-counter)
Stars: ✭ 18 (-64.71%)
Mutual labels:  yii2, yii2-extension
yii2-bankcard-info
银行卡卡号分析(Yii2扩展)
Stars: ✭ 15 (-70.59%)
Mutual labels:  yii2, yii2-extension
background-translation-i18n
Based on the YII2 module to translate JSON formatted translation files on the web
Stars: ✭ 11 (-78.43%)
Mutual labels:  yii2, yii2-extension
yii2-mailqueue
Yii2 mail queue component for yii2-swiftmailer.
Stars: ✭ 15 (-70.59%)
Mutual labels:  yii2, yii2-extension
yii2-cropper
Yii2 Image Cropper InputWidget
Stars: ✭ 22 (-56.86%)
Mutual labels:  yii2-extension, yii2-widgets

WARNING: This extension is not more maintained (The base JS script FileAPI was deprecated)

Yii2 FileAPI widget.

This widget is a Yii 2 wrapper of FileAPI plugin.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist vova07/yii2-fileapi-widget "*"

or add

"vova07/yii2-fileapi-widget": "*"

to the require section of your composer.json file.

Usage:

// MyController.php

use vova07\fileapi\actions\UploadAction as FileAPIUpload;
...

public function actions()
{
    return [
        'fileapi-upload' => [
            'class' => FileAPIUpload::className(),
            'path' => '/path/to/temp/files'
        ]
    ];
}
// MyModel.php

use vova07\fileapi\behaviors\UploadBehavior;
...

public function behaviors()
{
    return [
        'uploadBehavior' => [
            'class' => UploadBehavior::className(),
            'attributes' => [
                'preview_url' => [
                    'path' => '/path/to/previews',
                    'tempPath' => '/path/to/temp/files/previews',
                    'url' => '/url/to/previews'
                ],
                'image_url' => [
                    'path' => '/path/to/images',
                    'tempPath' => '/path/to/temp/files/images',
                    'url' => '/url/to/images'
                ]
            ]
        ]
    ];
}
// _form.php

use vova07\fileapi\Widget as FileAPI;
...

echo $form->field($model, 'preview_url')->widget(
    FileAPI::className(),
    [
        'settings' => [
            'url' => ['/controller/fileapi-upload']
        ]
    ]
);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].