title: Codeigniter upload file is empty
body: <p>i have a problem with uploading files. I am using codeigniter framework and dropzone.js to uplaod the files.</p>
  
  <p>in my view:</p>
  
  <pre><code>&lt;!-- START MODAL ADD FILE --&gt;
     &lt;!-- Modal --&gt;
      &lt;div class="modal fade" id="myModalFile" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"&gt;
        &lt;div class="modal-dialog" role="document"&gt;
          &lt;div class="modal-content"&gt;
            &lt;div class="modal-header"&gt;
              &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;
              &lt;h4 class="modal-title" id="myModalLabel"&gt;Nahrát Soubory&lt;/h4&gt;
            &lt;/div&gt;
            &lt;div class="modal-body"&gt;           
                   &lt;form action="&lt;?php echo base_url("items/upload_agreement"); ?&gt;" class="dropzone" method="POST" enctype="multipart/form-data"&gt;
                        &lt;input type="hidden" name="agreement_dir_name" value="&lt;?= $agreementDir;?&gt;"  &gt;
                        &lt;input type="hidden" name="dir_name" value="&lt;?= $customer_dir;?&gt;"  &gt;
                        &lt;input type="hidden" name="customer_id" value="&lt;?= $customerID;?&gt;"  &gt;
                        &lt;input type="hidden" name="agreement_id" value="&lt;?= $agreementID;?&gt;"  &gt; 
                      &lt;div class="fallback"&gt;
                        &lt;input name="fileToUpload[]" type="file" id="fileToUpload" multiple /&gt;
                      &lt;/div&gt;               
            &lt;/div&gt;
            &lt;div class="modal-footer"&gt;
              &lt;button type="button" class="btn btn-danger btn-default" data-dismiss="modal"&gt;Zavřít&lt;/button&gt;
              &lt;input type="submit" class="btn btn-success btn-default" value="Nahrát" &gt;
              &lt;/form&gt;
            &lt;/div&gt;
  
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;!-- END MODAL ADD FILE --&gt;
  </code></pre>
  
  <p>controller:</p>
  
  <pre><code>public function upload_agreement()
  {
  $customerDir = $this-&gt;input-&gt;post('dir_name');
  $agreementDir = $this-&gt;input-&gt;post('agreement_dir_name');
  
  $config['upload_path']          = "/www/Cesarlease2/leases/$customerDir/$agreementDir/";
  
  
  $this-&gt;load-&gt;library('upload', $config);
  
                  $data = array('upload_data' =&gt; $this-&gt;upload-&gt;data());
                  $this-&gt;session-&gt;set_flashdata('success_msg', 'Soubor úspěšně nahrán');
                  redirect("items/items/".$this-&gt;input-&gt;post('customer_id')."/".$this-&gt;input-&gt;post('agreement_id'));
  
  }
  </code></pre>
  
  <p>The problem is that uploaded file is returning as empty:</p>
  
  <blockquote>
    <p>array(1) { ["upload_data"]=> array(14) { ["file_name"]=> string(0) "" ["file_type"]=> string(0) "" ["file_path"]=> string(56) "/www/Cesarlease2/leases/testircrswqe789745asda/2-42017a/" ["full_path"]=> string(56) "/www/Cesarlease2/leases/testircrswqe789745asda/2-42017a/" ["raw_name"]=> bool(false) ["orig_name"]=> string(0) "" ["client_name"]=> string(0) "" ["file_ext"]=> string(0) "" ["file_size"]=> NULL ["is_image"]=> bool(false) ["image_width"]=> NULL ["image_height"]=> NULL ["image_type"]=> string(0) "" ["image_size_str"]=> string(0) "" } }</p>
  </blockquote>
  
  <p>I tried dumping the POST value of fileToUpload input, also empty. Is there something i am overlooking ?</p>