title: why pdf upload fails on codeigniter 1.7.2?
body: <p>i have same problem. other files doc, xls uploads fine. but pdf uploading gives error. “The filetype you are attempting to upload is not allowed.”
  in config/mimnes.php i have: </p>
  
  <pre><code>'pdf'    =&gt;    array('application/pdf', 'application/x-download', 'application/download'),  
  </code></pre>
  
  <p>in controllers i have: </p>
  
  <pre><code>function upload_file($type, $upload_type)
  {
      $this-&gt;load-&gt;library('upload');
      //upload file
      switch($upload_type){
          case "image":
              $config['upload_path'] = './uploads/';
              $config['allowed_types'] = 'gif|jpg|jpg|png|pdf';
              $config['max_size'] = '3000';
              $config['max_width'] = '3224';
              $config['max_height'] = '1268';
          break;
          case "doc":
              $config['upload_path'] = './uploads/pages/doc/';
              $config['allowed_types'] = 'pdf|doc|docx|xls|ppt';
              $config['max_size'] = '3000';
              $config['encrypt_name'] = TRUE;
          break;
      }
      foreach($_FILES as $key =&gt; $value)
      {
          if( ! empty($value['name']))
          {
                  $this-&gt;upload-&gt;initialize($config);
  
                  if ( ! $this-&gt;upload-&gt;do_upload($key))
                  {
                  $errors = array('error' =&gt; $this-&gt;upload-&gt;display_errors());
                  $this-&gt;session-&gt;set_flashdata('flashError', $errors);
  
                  }
                  else
                  {
                       $this-&gt;page_model-&gt;process_file($type, $upload_type);
                  }
           }
      }
  }  
  </code></pre>
  
  <p>any help will be appreciable.</p>