public static function detectMimeType($fileName)
    {
        $fileInfo = finfo_open(FILEINFO_MIME_TYPE);
        $mime = finfo_file($fileInfo, $fileName);
        finfo_close($fileInfo);

        return $mime;
    }