title: Joomla set `file` field value after save
body: <p>For my backend component i need able upload image for my items. It all works fine, i add field for image:</p>
  
  <pre><code>&lt;field
      type="file"
      name="category_image"
      accept="image/*"
      label="COM_SKYCATALOG_ITEM_CATEGORY_IMAGE_LABEL"
      directory=""
      preview="false"
  /&gt;
  </code></pre>
  
  <p>and then update <code>save()</code> method to control upload:</p>
  
  <pre><code>$jinput = JFactory::getApplication()-&gt;input;
  $files = $jinput-&gt;files-&gt;get('jform');      
  
  $fileinfo =pathinfo($files['category_image']['name']);
  
  $ext = $fileinfo['extension'];
  $filename = time().".$ext";     
  
  $tmp_file = $files['category_image']['tmp_name'];
  
  $dest = "../media/com_xxxxx/upload/".$filename;
  
  if (JFile::upload($tmp_file, $dest)) {
        // successed :)
  } else {              
       // failed :(
  echo "FAAAIL!!!";
  die();
  }        
  </code></pre>
  
  <p>When i choose file and save item, file uploaded to folder, but then category image field is empty. And also field for category_image in mysql table did not updated, but when i use <code>media</code> field type it works fine.</p>
  
  <p>What is possible wrong here?</p>
  
  <p>I did not like media manager it to slow to work with.</p>