![]() |
Inaccurate mime type detection in file uploading class - 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: Inaccurate mime type detection in file uploading class (/showthread.php?tid=44045) |
Inaccurate mime type detection in file uploading class - El Forum - 08-01-2011 [eluser]aL3xa[/eluser] I'm having hard times making file uploading class working as I want. First I found a problem with allowed_types config option, and luckily, I found a workaround here. However, if I head over to mimes.php and add custom file extension, such as 'fwf' (stands for fixed width format, which is just a plain textual file) and add 'text/plain' as it's mime type, upon upload I get 'application/octet-stream' in response array field ('file_type'). It's quite certain that I'll need to tweak some functions in upload class. Is there any chance that I can bypass CI mime check and use PECL Fileinfo extension instead? Any suggestions about how to do it properly? |