upload library processing with wrong mime type |
First, thanks for providing such a wonderful framework. I'm new here, don't know about many rules of the forum so sorry in advance.
I found the custom mime is not working and also, the _file_mime_type() not working correctly. Basically if i upload any apk file then the mime should be "application/vnd.android.package-archive" but program returning only "application/zip". Maybe i'm wrong(i know that this wonderful framework is developed by the best php experts around the globe) but please help me to understand how i can deal with it. I started debugging and landed on this function. Here is the code: if (function_exists('finfo_file')) { $finfo = @finfo_open(FILEINFO_MIME); if (is_resource($finfo)){ $mime = @finfo_file($finfo, $file['tmp_name']); finfo_close($finfo); if (is_string($mime) && preg_match($regexp, $mime, $matches)) { log_message('error', json_encode([$mime, $matches,$matches[1]])); $this->file_type = $matches[1]; return; } } } |
Messages In This Thread |
upload library processing with wrong mime type - by hemantmudgil - 05-01-2019, 02:42 PM
RE: upload library processing with wrong mime type - by InsiteFX - 05-02-2019, 03:35 AM
RE: upload library processing with wrong mime type - by Paradinight - 05-02-2019, 04:23 AM
RE: upload library processing with wrong mime type - by Zapata5N - 01-24-2020, 02:34 AM
|