我想在 xupload 扩展中使用多个属性
我的代码:-
Yii::import("xupload.models.XUploadForm");
$this->widget( 'xupload.XUpload', array(
'id'=>'uploadwidget',
'url' => Yii::app( )->createUrl("$mo"),
'model' => $photo,
'htmlOptions' => array('id'=>'testmagazines-form'),
'attribute' => 'file',
'multiple' => true,
'options'=>array(
'maxNumberOfFiles'=>3,
'maxFileSize'=>"js:$('#filesize').val()",
'acceptFileTypes'=>"js:/(\.|\/)(jpeg)$/i",
'completed' =>"js:function(id, fileName, responseJSON){
var value = $('#number').val();
var value1 = parseInt(value) + parseInt(1);
$('#number').val(value1);
jQuery(document).trigger('close.facebox');
}",
'success'=>"js:function(res){
var b = $('#number').val();
if(b=='1'){
$('#filesize').val('104857600');
}else if(b=='2'){
$('#filesize').val('104857600');
}else if (b==3){
$('#filesize').val('10*1024*1024');
}
alert(res[0].mode);
}",
'messages'=>array(
'typeError'=>"{file} has invalid extension. Only {extensions} are allowed.",
'sizeError'=>"{file} is too large, maximum file size is {sizeLimit}.",
'minSizeError'=>"{file} is too small, minimum file size is {minSizeLimit}.",
'emptyError'=>"{file} is empty, please select files again without it.",
'onLeave'=>"The files are being uploaded, if you leave now the upload will be cancelled."
),
'showMessage'=>"js:function(message){ alert(message); }"
),
)
);
在这个我想每个上传文件的exe。可能有所不同,所以我如何处理它。