src/Helpers/Request/FileHelper.php
public function getMimeType($file, $magicFile = null, $checkExtension = true)
    {
        return $this->proxy(__FUNCTION__, [$file, $magicFile, $checkExtension]);
    }
public function getMimeType($file, $magicFile = null, $checkExtension = true)
    {
        return $this->proxy(__FUNCTION__, [$file, $magicFile, $checkExtension]);
    }
Determines the MIME type of the specified file.
This method will first try to determine the MIME type based on
[finfo_open](http://php.net/manual/en/function.finfo-open.php). If the `fileinfo` extension is not installed,
it will fall back to [[getMimeTypeByExtension()]] when `$checkExtension` is true.
@param string $file the file name.
@param string $magicFile name of the optional magic database file (or alias), usually something like `/path/to/magic.mime`.
This will be passed as the second parameter to [finfo_open()](http://php.net/manual/en/function.finfo-open.php)
when the `fileinfo` extension is installed. If the MIME type is being determined based via [[getMimeTypeByExtension()]]
and this is null, it will use the file specified by [[mimeMagicFile]].
@param bool $checkExtension whether to use the file extension to determine the MIME type in case
`finfo_open()` cannot determine it.
@return string the MIME type (e.g. `text/plain`). Null is returned if the MIME type cannot be determined.
@see \Reaction\Helpers\FileHelper::getMimeType()