Yii 1.1: plupload

The following container allows you to add multiple images interactively.
2 followers

Plupload

The following container integrates the plupload component, allowing you to add multiple images interactively.

Configure

If you want to change settings, first check the plupload documentation

Requirements

Yii 1.14

Usage

1) Extract content in your extensions directory

2) Embed this actions in the controller that makes the call:

class SiteController extends Controller {
public function actions() {
  ...
  'upload' => 'ext.plupload.actions.UploadAction',
  'destroy' => 'ext.plupload.actions.DestroyAction',
  ...
}

3) Call the widget in your view:

<?php $this->widget('ext.plupload.Plupload', 
    array(
        'types' => array(
            array(
                "title" => "Image file",
                "extensions" => "jpg,gif,png"
            ),
    )); ?>

Important notes:

  • The file name is encrypted in md5 and uploaded to the "uploads" folder in the root of the project.
  • When loading the images are stored in the form ('md5Name' => 'fileName') in the session variable 'plupload', can be accessed using Yii :: app () -> user-> getState ('plupload')

Example

screenshots

Be the first person to leave a comment

Please to leave your comment.

Create extension