private-it/yii2-dropzone

Yii2 Dropzone widget

Installs: 23

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 13

Type:yii2-extension

2.0.1 2017-02-05 15:21 UTC

This package is not auto-updated.

Last update: 2024-12-07 21:33:24 UTC


README

This extension provides the Dropzone integration for the Yii2 framework.

Information

This repository is fork from DevGroup-ru/yii2-dropzone

Installation

Run composer

composer require --prefer-dist private-it/yii2-dropzone "*"

General Usage

Config file:

...
'bootstrap' => [
    'dropZone' => [
        'class' => \devgroup\dropzone\DropZoneBootstrap::className(),
        'autoRegisterAssets' => true,
        'autoRegisterController' => true,
    ]
],
...

View file:

<?= \devgroup\dropzone\DropZone::widget([
    'name' => 'file',
    'options' => [
        'addRemoveLinks' => true,
        // translate options:
        // 'dictRemoveFile' => '',
        // 'dictRemoveFileConfirmation' => '',
        // 'dictDefaultMessage' => '',
    ],
    'registerEventRemovedFile' => true,
]) ?>

addRemoveLinks - flag for enable link "Remove file"

registerEventRemovedFile - flag for attache default event for remove file from server