I am new to yii. i want to upload multiple images into db using CMultiFileUpload.so,I am using MultiFile plugin.

view :

$this->widget('CMultiFileUpload', array(
    'model'=>$model,
    'attribute'=>'imageurl',
    'name' => 'imageurl',
    'accept'=>'jpg|png',
    'options'=>array(
// 'onFileSelect'=>'function(e, v, m){ alert("onFileSelect - "+v) }',
// 'afterFileSelect'=>'function(e, v, m){ alert("afterFileSelect - "+v) }',
// 'onFileAppend'=>'function(e, v, m){ alert("onFileAppend - "+v) }',
// 'afterFileAppend'=>'function(e, v, m){ alert("afterFileAppend - "+v) }',
// 'onFileRemove'=>'function(e, v, m){ alert("onFileRemove - "+v) }',
// 'afterFileRemove'=>'function(e, v, m){ alert("afterFileRemove - "+v) }',
),
'denied'=>'File is not allowed',
'max'=>10, // max 10 files 
// 'maxFiles' => 14,
'htmlOptions' => array( 'multiple' => 'multiple', 'class' => 'form-control'),
));

I already load js file before body ending

<script src="helper/js/jquery.multifile.js"></script>
0

There are 0 best solutions below