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][1]
[1]: http://goo.gl/qhUXVP
Doesn't work at all
I did everything according to instructions. But instead of using a form to upload files see the message: "Your browser doesn't have Flash, Silverlight or HTML5 support." My Yii 1.1.17-dev. My browser is Firefox 37.0.2 (Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0). The form at http://www.plupload.com/examples/ work well. What is wrong? I have Shockwave Flash 11.2 r202
UPD1: I have cleaned the directory /admin/assets and the form is now displayed. But in console log: "TypeError: this.browse_button.button is not a function"
When using LINUX, you should be very clear that to write a directory you need write permissions.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.