SWFUpload and CI cannot correctly upload and identify the MIME type of files. The solution is as follows, similar to other frameworks. Source code (systemlibrariesupload. php199line) $ this-file_typepreg_replace (^ (. + ?);. * $, \ 1, $ _ FILES [$ field] [type]); the solution is changed to the following, and other frameworks are similar.
Source code (/system/libraries/upload. php 199 line)
$ This-> file_type = preg_replace ("/^ (. + ?);. * $/"," \ 1 ", $ _ FILES [$ field] ['type']);
To:
The code is as follows:
// Edit By Tacker
If (function_exists ('Mime _ content_type ')){
$ This-> file_type = preg_replace ("/^ (. + ?);. * $/"," \ 1 ", mime_content_type ($ this-> file_temp ));
} Else {
$ This-> file_type = preg_replace ("/^ (. + ?);. * $/"," \ 1 ", $ _ FILES [$ field] ['type']);
}
Bytes. Source code (/system/libraries/upload. php 199 line) $ this-file_type = preg_replace ("/^ (. ++ ?);. * $/"," \ 1 ", $ _ FILES [$ field] ['type']); change...