    public function actionDownload($id){
        $model = $this->loadModel($id);
        if (!$this->checkPermissions ($model, 'view')) $this->denied ();

        $filePath = $model->getPath();
        if ($filePath != null)
            $file = Yii::app()->file->set($filePath);
        else
            throw new CHttpException(404);
        if($file->exists)
            $file->send();
        //Yii::app()->getRequest()->sendFile($model->fileName,@file_get_contents($fileName));
        $this->redirect(array('view', 'id' => $id));
    }
The product receives input or data, but it does
        not validate or incorrectly validates that the input has the
        properties that are required to process the data safely and
        correctly.