title: codeigniter video uploading
body: <p>I'm trying to upload a video.</p>
  
  <p><strong>My mime config:</strong></p>
  
  <pre><code>'wmv' =&gt; array('video/wmv', 'video/x-ms-wmv', 'flv-application/octet-stream', 'application/octet-stream'),
  'flv' =&gt; array('video/x-flv', 'flv-application/octet-stream', 'application/octet-stream'),
  'mp4' =&gt; 'video/mp4',
  '3gp' =&gt; 'video/3gpp'
  </code></pre>
  
  <p><strong>My view:</strong></p>
  
  <pre><code> &lt;div id="upload"&gt;
          &lt;?php
          echo form_open_multipart('audio');
          echo form_upload('userfile');
          echo form_submit('upload','Upload');
          echo form_close();
          ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>My controller:</strong></p>
  
  <pre><code> function index() {
      $this-&gt;load-&gt;model('Audio_model');
      if ($this-&gt;input-&gt;post('upload')) {
          $this-&gt;Audio_model-&gt;do_upload();
      }
      $this-&gt;load-&gt;view('v_audio');
  }  
  </code></pre>
  
  <p><strong>My model:</strong></p>
  
  <pre><code> function do_upload() {
      $config = array(
          'allowed_types' =&gt;  'mp4|3gp|flv|mp3',
          'max_size'=&gt;'100000',
          'upload_path' =&gt; $this-&gt;gallery_path
      );
      $this-&gt;load-&gt;library('upload', $config);
      if ($this-&gt;upload-&gt;do_upload()) {
          echo "Upload success!";
      } else {
          echo "Upload failed!";
      }
  }  
  </code></pre>
  
  <p>I can upload mp3's successfully, but not mp4, 3gp or flv, they all fail to upload. </p>