I am a yiibie and i am working on uploading of video. I have used the uploadmultifile
extension and have made changes according to this link http://www.yiifra
If you don't save the model in database, first check if data from submit are what you need and the model is saved without model validation.
public function actionCreate()
{
$model=new Video;
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
if(isset($_POST){
var_dump('ALL POST');
var_dump($_POST);
} else {
var_dump('NO POST');
}
if(isset($_POST['video']))
{
var_dump('VIDEO POST');
var_dump($_POST['video']);
$model->attributes=$_POST['video'];
//$model->video = Video::getInstance($model, 'video');
if($model->save(false))
$this->redirect(array('view','id'=>$model->id));
}
$this->render('create',array(
'model'=>$model,
));
}
If the var_dump show proper value and overriding the validation the value is saved in db the problem is in the validation rules.
and in the view try
<?php
echo "<br /> Video = : ". $model->video ."<br />";
?>