I try upload mxf file used codeigniter upload helper, but get 404 error when i try called, this is because the file no upload to server.
the file is name.MXF
$this->upload->display_errors() return
The filetype you are attempting to upload is not allowed.
this is strange, because in $config["allowed_types"] It is added the filetype
I can upload others type files in the same folder, therefore isn't a problem the permission or htaccess.
code example:
contoller
public function uploadFile(){
$config["allowed_types"] = 'MxF|mxf|MXF';
$folder= './uploads/';
if (!file_exists($folder)) {
mkdir($folder, 0777, true);
}
$config["upload_path"] = $folder;
$this->load->library('upload', $config);
$this->upload->initialize($config);
$FileName="name";
$this->upload->do_upload($FileName);
}
htaccess
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt|assets|js|uploads|)
RewriteRule ^(.*) index.php?/$1 [QSA,L]
how i can upload this type files?
please help me!
SOLUTION
I found answer in this link and setting the "allowed_types" = '*' Codeigniter: The filetype you are attempting to upload is not allowed