title: CodeIgniter upload fails - filetype is not allowed
body: <p>I'm keep getting error <code>The filetype you are attempting to upload is not allowed</code>, when I try to upload MP4 movie file.</p>
  
  <p>This is my upload function</p>
  
  <pre><code>public function upload_post() {
          $config['upload_path'] = ROOT_DIR . $dataBasePath;
          $config['allowed_types'] = 'avi|mov|mp4|jpeg|jpg|png';
          $config['remove_spaces'] = true;
          $config['max_size'] = '80000';
          $config['encrypt_name'] = true;
          $this-&gt;upload-&gt;initialize($config);
          if ($this-&gt;upload-&gt;do_upload('userFile')) {
              $uploadData = $this-&gt;upload-&gt;data();
              if ($uploadData) {
                  $this-&gt;response([
                     'data' =&gt; $uploadData
                  ], REST_Controller::HTTP_OK);
              } else {
                  $this-&gt;response([
                      'status' =&gt; false,
                      'message' =&gt; 'failed'
                  ], REST_Controller::HTTP_CONFLICT);
              }
          } else {
              var_dump($_FILES);
              die();
              $this-&gt;response([
                  'status' =&gt; false,
                  'errors' =&gt; ['error' =&gt; $this-&gt;upload-&gt;display_errors()]
              ], REST_Controller::HTTP_CONFLICT);
          }
  }
  </code></pre>
  
  <p>When I upload a file and <code>var_dump($_FILES)</code> data if upload fails, this is the result</p>
  
  <pre><code>array (size=1)
    'userFile' =&gt; 
      array (size=5)
        'name' =&gt; string '1-video.mp4' (length=11)
        'type' =&gt; string '' (length=0)
        'tmp_name' =&gt; string '' (length=0)
        'error' =&gt; int 1
        'size' =&gt; int 0
  </code></pre>
  
  <p>The result of <code>var_dump(get_mime_by_extension($_FILES['userFile']['name']))</code> is following</p>
  
  <pre><code>'video/mp4'
  </code></pre>
  
  <p>I have also checked my mimes.php file and I have entire</p>
  
  <pre><code>'mp4'   =&gt;  array('video/mp4', 'application/octet-stream'),
  </code></pre>
  
  <p>I don't know what else should I do or check in order to upload a file successfully? Uploading images works OK.
   If you need any additional informations, please let me know and I will provide. Thank you</p>