Hi all ,
I have issue with my application.
I can save my images in blob field of database. But when I try to display, it gives error message “Property “ImageTableController.model” is not defined.” i tried for this. But I can’t find the error. Can anyone help me plz…
here is my controller.
public function actionloadImage($id)
{
$model=$this->loadModel($id);
$this->renderPartial('image', array(
'model'=>$model
));
}
array('allow', // allow authenticated user to perform 'create' and 'update' actions
'actions'=>array('create','update','loadImage','delete'),
'users'=>array('@'),
),
Here is my view…
<?php
header('Content-Type: ' . $model->fileType);
print $model->image;
exit();
?>
echo CHtml::image(Yii::app()->controller->createUrl('image_table/loadImage', array('id'=>$this->model->id)));