无法上传ogg或ogv文件

I can't upload ogg / ogv file. the error message is

The filetype you are attempting to upload is not allowed.

I have tried this in the mimes.php

'ogg' => array('application/x-ogg', 'application/ogg', 'audio/x-ogg, application/octet-stream'),
                            'ogv'   =>    array('application/ogv', 'video/ogv')    

and in the controller

$config['upload_path']   = 'assets/assets/video/';
$config['allowed_types'] = 'ogv|ogg';
$config['file_name'] = "samsame";
$config['remove_spaces'] = TRUE;
$this->load->library('upload', $config);
$this->upload->do_upload('videoname');
$error = $this->upload->display_errors();

You have to initialize the $config array, so your problem will be solved. You are trying to upload without initializing. Please write the below line after loading the library.

$this->upload->initialize($config);

Also check that your form must be multipart

You can also rewrite the $config array if above solution dose't work. Here sample_simage

is the name of input type.

$allowed_types = 'ogg|ogv';
$config['upload_path'] = './assets/uploads/';    
$config['allowed_types'] = substr($allowed_types, strpos($allowed_types,substr($_FILES['sample_simage']['name'], -3)), 3);
$this->load->library('upload', $config);
$this->upload->do_upload('sample_simage');