Welcome Guest, Not a member yet? Register   Sign In
codeigniter upload 3gp or mp4 files doesnt work

hi I am trying to upload 3gp and mp4 files on code igniter and it doesnt work

the mpg files are uploaded fine using the same code could anyone help me with that I will really appreciate that

Here is the code i am using

$config = array(
'allowed_types' => 'mp4|mp4|3gp',
'file_name' => 'video',
'max_size' => 1000,
'upload_path' => realpath(APPPATH.'../user_uploads/'),



$user_upload = $this->upload->data();

You'll probably have to add the extensions & mimetypes to the /application/config/mimes.php file for the upload class to recognise them.

could you please tell me how to do that for mp4 and 3gp files??

Adding these to the $mimes array should do it:

'mp4' => 'video/mp4',
'3gp' => 'video/3gpp',

If not you'll have to print_r($_FILES) to see what mimetype the files are and replace them accordingly.

Thanks a lot

Theme © iAndrew 2016 - Forum software by © MyBB