title: CodeIgniter: "The filetype you are attempting to upload is not allowed."
body: <p>I'm experiencing a very odd upload problem. Here's the relevant view file:</p>
  
  <pre><code>&lt;form action="http://localhost/index.php/temp/upload/" method="post" enctype="multipart/form-data"&gt;
      &lt;fieldset&gt;
          &lt;input type="file" name="userfile"/&gt;
          &lt;input type="submit" value="Upload"/&gt;
      &lt;/fieldset&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And here's my <code>temp</code> controller's <code>upload()</code> method:</p>
  
  <pre><code>public function upload()
  {
      $config['upload_path']   = FCPATH . 'uploads' . DIRECTORY_SEPARATOR;
      assert(file_exists($config['upload_path']) === TRUE);
      $config['allowed_types'] = 'avi|mpg|mpeg|wmv|jpg';
      $config['max_size']      = '0';
  
      $this-&gt;load-&gt;library('upload', $config);
      if ($this-&gt;upload-&gt;do_upload('userfile') === FALSE)
      {
          // Some error occured
          var_dump($this-&gt;upload-&gt;display_errors('', ''));
          var_dump($_FILES);
      }
      else
      {
          // Upload successful
          var_dump($this-&gt;upload-&gt;data());
      }
  }
  </code></pre>
  
  <p>When I upload an AVI video, everything works fine. When I upload, say, a WMV video, I get the following var dumps:</p>
  
  <pre><code>string 'The filetype you are attempting to upload is not allowed.' (length=57)
  
  array
    'userfile' =&gt; 
      array
        'name' =&gt; string 'wmv.wmv' (length=7)
        'type' =&gt; string 'video/x-ms-wmv' (length=14)
        'tmp_name' =&gt; string 'C:\wamp\tmp\php2333.tmp' (length=23)
        'error' =&gt; int 0
        'size' =&gt; int 83914
  </code></pre>
  
  <p>The "wmv" extension is being interpreted as the MIME type: <code>video/x-ms-wmv</code>. This should be fine since my config/mimes.php has the following:</p>
  
  <pre><code>'wmv' =&gt;  array('video/x-ms-wmv', 'audio/x-ms-wmv')
  </code></pre>
  
  <p>It's a similar situation when I try uploading other files. So far, the only one that seems to work is my test AVI video.</p>
  
  <p>Any ideas what might be wrong?</p>
  
  <p><strong>UPDATE 1:</strong></p>
  
  <p>One my machine, only AVI uploads. On another developer's machine, no files upload. On yet another developer's machine, all supported files upload. Are these browser or server issues?</p>