title: Yii not able to save Image files CFileUploaded
body: <p>I am not able to save the image uploaded from simple Form with this code</p>
  
  <pre><code>public function actionImage()
  {
      print_r($_FILES);
      $dir = Yii::getPathOfAlias('application.uploads');
  
      if(isset($_POST['img']))
      {
          $model = new FileUpload();
          $model-&gt;attributes = $_POST['img'];
          $model-&gt;image=CUploadedFile::getInstance($model,'image');
          if($model-&gt;validate())
          {
              $model-&gt;image-&gt;saveAs($dir.'/'.$model-&gt;image-&gt;getName());
              // redirect to success page
  
          }
      }
  }
  </code></pre>