title: Code Igniter File Upload, Unable to upload pdf and doc, result no file uploaded without an error
body: <p>I've use do upload for my image on first time, and thats worked fine.
  Then i want to upgrade for upload a pdf,doc, and xls.
  Image, and xls worked, there is the file in <em>upload_folder</em> , and the file worked to download.</p>
  <p>The problem when i trying to upload a pdf and docs, the file isnt uploaded to <em>upload_folder</em>
  this is my code :</p>
  <p><strong>mimes.php</strong></p>
  <pre><code>'pdf'   =&gt;  array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'),
  </code></pre>
  <p><strong>core.php for download file</strong></p>
  <pre><code>function download($src)
  {
      $this-&gt;load-&gt;helper('download');
      force_download('uploads/'.$src, NULL);
  }
  </code></pre>
  <p><strong>insert.php for upload file</strong></p>
  <pre><code>function insert(){
          
          $id_car_header  = $this-&gt;input-&gt;post('input_id_car_header');
          $keterangan     = $this-&gt;input-&gt;post('input_keterangan');
          $arsip = $_FILES[&quot;input_arsip&quot;]['name'];
         
          if ($arsip ='')
          {}
          else
          {   
              $config ['allowed_types']   = 'jpg|jpeg|png|docx|pdf|xls';
              $arsip_generate =$_FILES[&quot;input_arsip&quot;]['name'];
              $config ['upload_path']     = './uploads';
              $config['file_name'] = $arsip_generate;
                      $this-&gt;load-&gt;library('upload', $config);
                      $this-&gt;load-&gt;library('upload', $config);
                  //$this-&gt;upload-&gt;initialize($config);
                  if (!$this-&gt;upload-&gt;do_upload('input_arsip')) 
                      {
                           //$this-&gt;upload-&gt;display_errors();
                         echo &quot;Gambar Gagal DiUpload..!!&quot;;
                      } else{
                              $arsip = $this-&gt;upload-&gt;data('file_name');
                      }
          }
  
          $data = array
          (
              'id_car_header' =&gt; $id_car_header,
              'ket_arsip'    =&gt;  $keterangan,
              'datas'        =&gt;  $arsip
          );
  
          $check = $this-&gt;m_db-&gt;insertDataAll(&quot;tbl_car_arsip&quot;, $data);
          $this-&gt;checkInsert($check);     
      }
  </code></pre>
  <p><strong>my layout as form</strong></p>
  <pre><code>&lt;form action=&quot;&lt;?php echo base_url().'/insert/insertArsip'; ?&gt;&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
  
                      &lt;div class=&quot;col-md-12 col-xs-12&quot;&gt;
                          &lt;div class=&quot;form-group&quot;&gt;
                              &lt;input type=&quot;hidden&quot; name=&quot;input_id_car_header&quot; value=&quot;&lt;?= $carHeader['id_car_header']?&gt;&quot;&gt;
                             
                               &lt;label class=&quot;control-label col-md-3 col-sm-3 col-xs-12&quot;&gt;File/Foto &lt;/label&gt;
                              &lt;div class=&quot;col-md-9 col-sm-9 col-xs-12&quot;&gt;
                                  
                                 &lt;input type=&quot;file&quot; name=&quot;input_arsip&quot; class=&quot;form-control&quot;&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                         
                          &lt;div class=&quot;form-group&quot;&gt;
                              &lt;label class=&quot;control-label col-md-3 col-sm-3 col-xs-12&quot;&gt;Keterangan &lt;/label&gt;
                              &lt;div class=&quot;col-md-9 col-sm-9 col-xs-12&quot;&gt;
  
                                  &lt;textarea name=&quot;input_keterangan&quot; required=&quot;required&quot; class=&quot;form-control&quot; rows=&quot;3&quot; placeholder=&quot;Masukan Keterangan&quot;&gt;&lt;/textarea&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          
                          &lt;div class=&quot;ln_solid&quot;&gt;&lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class=&quot;form-group&quot;&gt;
                          &lt;div class=&quot;col-md-9 col-sm-9 col-xs-12 col-md-offset-3&quot;&gt;
                             
                                  &lt;button type=&quot;submit&quot; class=&quot;btn btn-success pull-right&quot;&gt;
                                      &lt;i class=&quot;fa fa-save&quot;&gt;&lt;/i&gt; Save
                                  &lt;/button&gt;
                              
                          &lt;/div&gt;
                      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  <p>I have trying to change my mime.php, and initialize, and change the structure code but all of that not working</p>
  <p>Can somebody tell me what i need to do to make my code work for upload pdf and docs?
  thank you very much</p>