<?php
$this->widget('ext.EAjaxUpload.EAjaxUpload',
	array(
	    'id' => 'upload_file',
	    'config' => array(
		'action' => Yii::app()->createUrl('document/uploadPhoto'),
		'allowedExtensions' => Yii::app()->params['document_allowed_extension'],
		'sizeLimit' => Setting::getDocumentSizeLimit() * 1024 * 1024,
		'upload_btn_text' => Yii::t('default', 'Upload File'),
		'onComplete' => 'js:function(id, fileName, responseJSON){
						
					       var path = responseJSON["file_path"];
					       var type = responseJSON["type"];
					       var size = responseJSON["size"];
					       var name = responseJSON["file_name"];
						$("#path_of_file").val(path);
						 $("#file_type").val(type);
						  $("#file_size").val(size);
						  $("#document_name").val(name);

	     }',
	    )
));
echo '<input type="hidden" id="path_of_file"/>';
echo '<input type="hidden" id="file_type"/>';
echo '<input type="hidden" id="file_size"/>';
echo '<input type="hidden" id="document_name"/>';
?>