i try to upalod wav
file using codeigniter.
But i have get this error message; The filetype you are attempting to upload is not allowed.
Code Shown below:
$config['upload_path'] = getwdir() . 'voices/';
$config['allowed_types'] = 'wav|mp3';
$config['max_size'] = 2800000;
$config['file_name'] = rand();
$this->upload->initialize($config);
var_dump($config);
if ($this->upload->do_upload('file')) {
var_dump('uploaded');
}else{
var_dump($this->upload->display_errors());
}
var_dump($_FILES['file']);
array (size=1)
'file' =>
array (size=5)
'name' => string 'blob' (length=4)
'type' => string 'audio/wav' (length=9)
'tmp_name' => string '/tmp/phpe2SQi5' (length=14)
'error' => int 0
'size' => int 98348