title: Fail on codeigniter upload
body: <p>I'm trying to upload a file using upload class on codeigniter but it throws me an error saying file path is invalid.</p>
  
  <p>I printed the <code>$this-&gt;upload-&gt;data</code>and it doesn't show file data, but the upload folder I setted exists and is shown on it.</p>
  
  <pre><code>array(14) {
      ["file_name"]=&gt; string(0) "" 
      ["file_type"]=&gt; string(0) ""
      ["file_path"]=&gt; string(36) "homologacao/assets/images/promocoes/" 
      ["full_path"]=&gt; string(36) "homologacao/assets/images/promocoes/"  
      ["raw_name"]=&gt; string(0) "" 
      ["orig_name"]=&gt; string(0) ""  
      ["client_name"]=&gt; string(0) ""  
      ["file_ext"]=&gt; string(0) ""  
      ["file_size"]=&gt; string(0) ""  
      ["is_image"]=&gt; bool(false)  
      ["image_width"]=&gt; string(0) ""  
      ["image_height"]=&gt; string(0) ""  
      ["image_type"]=&gt; string(0) ""  
      ["image_size_str"]=&gt; string(0) ""  
  }
  </code></pre>
  
  <p>But when I get the <code>$_FILES</code>data, it shows the uploaded file data</p>
  
  <pre><code>array(1) {
      ["imagem"]=&gt; array(5) { 
          ["name"]=&gt; string(68) "3bf514d6cbb31410ee47e8cbcc79c81588a6740fb4264209a1531077e0fcc0a9.jpg" 
          ["type"]=&gt; string(10) "image/jpeg" 
          ["tmp_name"]=&gt; string(14) "/tmp/phpomUcFo" 
          ["error"]=&gt; int(0) 
          ["size"]=&gt; int(3571) 
      } 
  }
  </code></pre>
  
  <p>I double checked my code and I think I'm setting things the right way</p>
  
  <pre><code>/*code slice with the upload part */
  
  $config['upload_path'] = 'homologacao/assets/images/promocoes/';
  $config['allowed_types'] = 'png|jpg|gif';
  $config['max_size'] = '1024';
  $config['encrypt_name'] = true;
  
  $this-&gt;load-&gt;library('upload', $config);
  
  $field_name = 'imagem';
  if ($this-&gt;upload-&gt;do_upload($field_name)) {
      /* do stuff */
  } else {
      var_dump($this-&gt;upload-&gt;data());
      var_dump($this-&gt;upload-&gt;display_errors());
      var_dump($_FILES);
  
      die();
  }
  </code></pre>
  
  <p>Why is file upload not working and how can I solve it?</p>