title: Codeigniter: The filetype you are attempting to upload is not allowed
body: <p>I'm using CI latest version. <strong>Got error while uploading a JPG files</strong>. I use the code from here <a href="https://www.codeigniter.com/userguide3/libraries/file_uploading.html" rel="nofollow noreferrer">https://www.codeigniter.com/userguide3/libraries/file_uploading.html</a> and a little bit from <a href="https://stackoverflow.com/questions/20113832/multiple-files-upload-in-codeigniter">Multiple files upload in Codeigniter</a></p>
  
  <p>The <strong>Controller</strong>:</p>
  
  <pre><code>$config = array(
  'upload_path'   =&gt; 'path to upload',
  'allowed_types' =&gt; 'jpg|gif|png|jpeg',
  'overwrite'     =&gt; 0,
  'max_size'      =&gt; 1024,                       
  );
  $this-&gt;load-&gt;library('upload', $config);
  $this-&gt;upload-&gt;initialize($config); // Make sure it has been initialized
  
  if (!$this-&gt;upload-&gt;do_upload('gambar1')){
      $error = array('error' =&gt; $this-&gt;upload-&gt;display_errors());
      return $error;
  }else{ echo 'success'; }
  </code></pre>
  
  <p>The <strong>View</strong>:</p>
  
  <pre><code>&lt;?php echo form_open(base_url().'report/send', 'method="post" enctype="multipart/form-data"', $hidden);?&gt;
  &lt;input type="file" class="hidden" name="gambar1"&gt;&lt;/form&gt;
  </code></pre>
  
  <p>When I'm trying to upload JPG files, it gives me <strong>The filetype you are attempting to upload is not allowed.</strong>
  Any idea? </p>