protected function lookupMimetype($path) { $finfo = new finfo(FILEINFO_MIME_TYPE); return $finfo->file($path); }