title: on editing file upload field is blank
body: <p>I am using cakephp 2x. I have a problem in my edit page image upload field. Everytime  when i try to edit my profile page , it shows image upload field blank.Other fields information are remains same as fill in the add form of profile but the image field is not enable to retrieve stored image. I am  new to cakephp,if anyone knows how i can retrieve image? plz help! And i also want to know how i can store more than one image and also check the same image is not uploading twice. Thanks! Here is my image upload code-></p>
  
  <pre><code> // File upload function in Model.php
         public $validate = array( 
           'image' =&gt; array(
          'uploadError' =&gt; array(
              'rule' =&gt; 'uploadError',
              'message' =&gt; 'Something went wrong with the file upload',
              'required' =&gt; FALSE,
              'allowEmpty' =&gt; TRUE,
          ),
          // http://book.cakephp.org/2.0/en/models/data-   validation.html#Validation::mimeType
  
          // custom callback to deal with the file upload
          'imageOne' =&gt; array(
              'rule' =&gt; 'imageOne',
              'message' =&gt; 'Something went wrong processing your file',
              'required' =&gt; FALSE,
              'allowEmpty' =&gt; TRUE,
              'last' =&gt; TRUE,
          ),
      ),
     );
  
  
  public function imageOne($check=array()) {
    // deal with uploaded file
     if (!empty($check['image']['tmp_name'])) {
  
        // check file is uploaded
        if (!is_uploaded_file($check['image']['tmp_name'])) {
          return FALSE;
        }
  
      // build full filename
       $filename = WWW_ROOT . $this-&gt;uploadDir . DS .   Inflector::slug(pathinfo($check['image']['name'],   PATHINFO_FILENAME)).'.'.pathinfo($check['image']['name'], PATHINFO_EXTENSION);
  
      // @todo check for duplicate filename
   /* if (!file_exists($check['image']['tmp_name'],$filename)) {
     echo "Sorry, file already exists.";
  
      }*/
      // try moving file
      if (!move_uploaded_file($check['image']['tmp_name'], $filename)) {
          return FALSE;
  
      // file successfully uploaded
      } else {
          // save the file path relative from WWW_ROOT e.g.     uploads/example_filename.jpg
          $this-&gt;data[$this-&gt;alias]['filepath'] = str_replace(DS, "/",     str_replace(WWW_ROOT, "", $filename) );
      }
  }
  
  return TRUE;
   }
  
  
     public function beforeSave($options = array()) {
    // a file has been uploaded so grab the filepath
    if (!empty($this-&gt;data[$this-&gt;alias]['filepath'])) {
      $this-&gt;data[$this-&gt;alias]['image'] = $this-&gt;data[$this-&gt;alias]    ['filepath'];
  }
  
  
    // Controller.php
  
    public function edit($id = null) {
      if (!$this-&gt;CollegeProfile-&gt;exists($id)) {
          throw new NotFoundException(__('Invalid college profile'));
      }
      if ($this-&gt;request-&gt;is(array('post', 'put'))) {
              $this-&gt;request-&gt;data['CollegeProfile']['user_id'] = $this-&gt;Auth-  &gt;user('id');
          $this-&gt;request-&gt;data['CollegeProfile']['id'] = $id;
          if ($this-&gt;CollegeProfile-&gt;save($this-&gt;request-&gt;data)) {
              $this-&gt;Session-&gt;setFlash(__('The college profile has been saved.'), 'default', array('class' =&gt; 'alert alert-success'));
              return $this-&gt;redirect(array('action' =&gt; 'index'));
          } else {
              $this-&gt;Session-&gt;setFlash(__('The college profile could not be saved. Please, try again.'), 'default', array('class' =&gt; 'alert alert-danger'));
          }
      } else {
          $options = array('conditions' =&gt; array('CollegeProfile.' . $this-&gt;CollegeProfile-&gt;primaryKey =&gt; $id));
          $this-&gt;request-&gt;data = $this-&gt;CollegeProfile-&gt;find('first', $options);
      }
      $this-&gt;loadModel('State');
      $states = $this-&gt;State-&gt;find('list');
      $this-&gt;set(compact('states'));
  }
  
   //Edit.ctp
   &lt;div class="form-group"&gt;
              &lt;?php echo $this -&gt;Form-&gt;input('image',array('class'=&gt;'form-control','type'=&gt;'file'));?&gt;
              &lt;/div&gt;
  </code></pre>