CodeIgniter Forums
i can`t upload wma - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: i can`t upload wma (/showthread.php?tid=13878)



i can`t upload wma - El Forum - 12-09-2008

[eluser]minhbu[/eluser]
i have got a form upload file but if i upload file mp3 which is ok but also i upload to file wma which is can`t upload.
i have got a error
file type not allowed!
function upload_multimedia($name,$path)
{

ini_set("max_execution_time","120");
ini_set("upload_max_filesize",902400);
ini_set("post_max_size",902400);
$config['upload_path'] = $path;
$config['allowed_types'] = 'mp3|wma|avi|wmv';
$config['encrypt_name']=true;
$config['remove_spaces']=true;
$config['max_size']=0;
$config['max_width']=0;
$config['max_height']=0;
$config['encrypt_name']=true;

$this->ci->upload->initialize($config);
if($this->ci->upload->do_upload($name))
{
$data=$this->ci->upload->data();
return $data['file_name'];
}
else
{
echo $this->ci->upload->display_errors();
return false;
}
}


i can`t upload wma - El Forum - 12-09-2008

[eluser]richthegeek[/eluser]
you need to edit the config/mimes.php file to allow wma.. not sure how well it work cross platform though, I had a problem with Java files using this uploader..