title: Uploading File failed in Codeigniter
body: <p>Here is my code and i dont know why its not working i already have mimes.php of csv file
  I don't know what is wrong i already use this code in other function its working but in here it's not working.</p>
  
  <p>Controller:</p>
  
  <pre><code>    function convert_csv(){
  
                  $config['upload_path']   = './files/contracts/'; 
                  $config['allowed_types'] = 'pdf|csv';   
                  $config['max_size']      = '4096';      
  
                  $this-&gt;load-&gt;library('upload', $config);
                  $this-&gt;upload-&gt;display_errors('', '');
  
                  if ( !$this-&gt;upload-&gt;do_upload("csvfile")){
                      $error = array('error' =&gt; $this-&gt;upload-&gt;display_errors('&lt;span&gt;','&lt;/span&gt;'));
                      $this-&gt;session-&gt;set_flashdata("upload_message", $error);
                  } else{
                      $upload_result = $this-&gt;upload-&gt;data(); 
                  }   
  }
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>&lt;?php   $form_options = array( 'id'    =&gt; 'contract_items', 
                                 'class' =&gt; 'form-horizontal' ); ?&gt;
  
  &lt;?=$this-&gt;formbuilder-&gt;open( $controller.'/convert_csv/'.$c-&gt;id, TRUE, $form_options );?&gt;
      &lt;?php echo form_open_multipart('upload/do_upload');?&gt;
  
          Select File To Upload:&lt;br /&gt;
          &lt;input type="file" name="csvfile" value="csvfile" text="csvfile" /&gt;
            &lt;br /&gt;&lt;br /&gt;
          &lt;input type="submit" value="Submit" /&gt;
  </code></pre>