How to Upload mp4 – CodeIgniter mime type

If you want to upload a file with CodeIgniter you should read my old post about it first.

Config Arguments

So, if you want to be able to upload mp4 files you have to tweak it a little bit.

When you setup the config arguments, add the allowed type and the max size.

$config['allowed_types'] = 'gif|jpg|png|mp4'; $config['max_size'] = '1000000000000000'; // whatever you need
Code language: PHP (php)

Add the mime type mp4 to CodeIgniter

Go to:


And add the following value to the $mime array.

'mp4' => 'video/mp4',
Code language: PHP (php)

Now you should be able to upload a mp4 video through a form input ๐Ÿ˜‰


Leave a Reply

Add <code> Some Code </code> if you need to.