I have a problem with Yii:
I have a Model called Slider.php and a controller called SliderController.php .
I wrote this code to make the user upload an image:
public function actionCreate()
{
$model=new Slider;
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
if(isset($_POST['Slider']))
{
$model->attributes=$_POST['Slider'];
$model->image=CUploadedFile::getInstance($model, 'image');
if($model->save()) {
if(strlen($model->image)>0)
{
$model->image->saveAs(Yii::app()->basePath.'/../uploads/slider/'.$model->image);
}
$this->redirect(array('view','id'=>$model->id));
}
}
$this->render('create',array(
'model'=>$model,
));
}
and it works fine.
My question is: how can I get/return the filetype and the size in the view?