![]() |
mime type detection - 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: mime type detection (/showthread.php?tid=52444) |
mime type detection - El Forum - 06-11-2012 [eluser]Unknown[/eluser] You might find this error in your log files: Code: ERROR - 2012-06-11 20:58:47 --> Severity: Notice --> Undefined index: tmp_path /ci/system/libraries/Upload.php 1058 I replaced tmp_path as suggested in the git repo fix. But the filetype error persisted. Line 1058 in system/Upload.php Code: @exec('file --brief --mime-type ' . escapeshellarg($file['tmp_name']), $output, $return_code); Ignore $file['tmp_name']. Not all linux distributions have the --mime-type argument for the file util, for example RH5 (centos), you should rely on -i --mime option instead since is present in debian and rh distros. Please test CI on most common linux distros ![]() I fixed it with this modification. Quick and dirty as the container function. Code: @exec('file -b -i ' . escapeshellarg($file['tmp_name']), $output, $return_code); |