this my contrall
public function actionCreate()
{
$model=new Cities;
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
if(isset($_POST['Cities']))
{
$rnd = rand(0,9999);
$model->attributes=$_POST['Cities'];
$uploadedFile=CUploadedFile::getInstance($model,'image');
// random number + file name
$fileName = "{$rnd}-{$uploadedFile}";
// get image with Number
$model->image = $fileName;
if($model->save())
//image uplode to rootDirectory
$uploadedFile->saveAs(Yii::app()->basePath.'/../images/cities/'.$fileName);//save image
$this->redirect(array('view','id'=>$model->city_id));
}
$this->render('create',array(
'model'=>$model,
));
}
how add thumbnail in this code plzzzzzzzzzzzzzzzzzzzzz