getMimeType.

@return string
484205
public function getMimeType()
    {
        try {
            return $this->mimeType ?: $this->files->mimeType($this->name);
        } catch (ErrorException $e) {
            return;
        }
    }
1048186
public function getMimeType()
    {
        try {
            $mimeType = $this->getFileSystem()->getMimetype($this->getPrefix());
            if ($mimeType == 'text/plain' && substr($this->getPrefix(), -4) == '.css') {
                $mimeType = 'text/css';
            }
            return $mimeType;
        } catch (FileNotFoundException $e) {
        }
        return false;
    }
642895
public function getMimetypeFromExtension($extension)
    {
        static $mimetypes = [
            '7z' => 'application/x-7z-compressed',
            'aac' => 'audio/x-aac',
            'ai' => 'application/postscript',
            'aif' => 'audio/x-aiff',
            'asc' => 'text/plain',
            'asf' => 'video/x-ms-asf',
            'atom' => 'application/atom+xml',
            'avi' => 'video/x-msvideo',
            'bmp' => 'image/bmp',
            'bz2' => 'application/x-bzip2',
            'cer' => 'application/pkix-cert',
            'crl' => 'application/pkix-crl',
            'crt' => 'application/x-x509-ca-cert',
            'css' => 'text/css',
            'csv' => 'text/csv',
            'cu' => 'application/cu-seeme',
            'deb' => 'application/x-debian-package',
            'doc' => 'application/msword',
            'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
            'dvi' => 'application/x-dvi',
            'eot' => 'application/vnd.ms-fontobject',
            'eps' => 'application/postscript',
            'epub' => 'application/epub+zip',
            'etx' => 'text/x-setext',
            'flac' => 'audio/flac',
            'flv' => 'video/x-flv',
            'gif' => 'image/gif',
            'gz' => 'application/gzip',
            'htm' => 'text/html',
            'html' => 'text/html',
            'ico' => 'image/x-icon',
            'ics' => 'text/calendar',
            'ini' => 'text/plain',
            'iso' => 'application/x-iso9660-image',
            'jar' => 'application/java-archive',
            'jpe' => 'image/jpeg',
            'jpeg' => 'image/jpeg',
            'jpg' => 'image/jpeg',
            'js' => 'text/javascript',
            'json' => 'application/json',
            'latex' => 'application/x-latex',
            'log' => 'text/plain',
            'm4a' => 'audio/mp4',
            'm4v' => 'video/mp4',
            'mid' => 'audio/midi',
            'midi' => 'audio/midi',
            'mov' => 'video/quicktime',
            'mp3' => 'audio/mpeg',
            'mp4' => 'video/mp4',
            'mp4a' => 'audio/mp4',
            'mp4v' => 'video/mp4',
            'mpe' => 'video/mpeg',
            'mpeg' => 'video/mpeg',
            'mpg' => 'video/mpeg',
            'mpg4' => 'video/mp4',
            'oga' => 'audio/ogg',
            'ogg' => 'audio/ogg',
            'ogv' => 'video/ogg',
            'ogx' => 'application/ogg',
            'pbm' => 'image/x-portable-bitmap',
            'pdf' => 'application/pdf',
            'pgm' => 'image/x-portable-graymap',
            'png' => 'image/png',
            'pnm' => 'image/x-portable-anymap',
            'ppm' => 'image/x-portable-pixmap',
            'ppt' => 'application/vnd.ms-powerpoint',
            'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
            'ps' => 'application/postscript',
            'qt' => 'video/quicktime',
            'rar' => 'application/x-rar-compressed',
            'ras' => 'image/x-cmu-raster',
            'rss' => 'application/rss+xml',
            'rtf' => 'application/rtf',
            'sgm' => 'text/sgml',
            'sgml' => 'text/sgml',
            'svg' => 'image/svg+xml',
            'swf' => 'application/x-shockwave-flash',
            'tar' => 'application/x-tar',
            'tif' => 'image/tiff',
            'tiff' => 'image/tiff',
            'torrent' => 'application/x-bittorrent',
            'ttf' => 'application/x-font-ttf',
            'txt' => 'text/plain',
            'wav' => 'audio/x-wav',
            'webm' => 'video/webm',
            'wma' => 'audio/x-ms-wma',
            'wmv' => 'video/x-ms-wmv',
            'woff' => 'application/x-font-woff',
            'wsdl' => 'application/wsdl+xml',
            'xbm' => 'image/x-xbitmap',
            'xls' => 'application/vnd.ms-excel',
            'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
            'xml' => 'application/xml',
            'xpm' => 'image/x-xpixmap',
            'xwd' => 'image/x-xwindowdump',
            'yaml' => 'text/yaml',
            'yml' => 'text/yaml',
            'zip' => 'application/zip',

            // Non-Apache standard
            'pkpass' => 'application/vnd.apple.pkpass',
            'msg' => 'application/vnd.ms-outlook',
        ];

        $extension = strtolower($extension);

        return isset($mimetypes[$extension])
            ? $mimetypes[$extension]
            : null;
    }
1011856
public function getMimeType($path, $default = "application/octet-stream")
    {

        $finfo = finfo_open(FILEINFO_MIME_TYPE); // return mime type ala mimetype extension
        $fmtype = finfo_file($finfo, $path);

        finfo_close($finfo);

        return !empty($fmtype) ? $fmtype : $default;
    }
31848
public function getType()
    {
        $mimeType = preg_replace('#^([^/]+)/.*$#', '$1', $this->getMimeType());

        if ($mimeType == 'video') {
            return Media::VIDEO;
        }

        if ($mimeType == 'audio') {
            return Media::AUDIO;
        }

        if ($mimeType == 'image') {
            return Media::IMAGE;
        }

        $extension = $this->getExtension();

        if (in_array($extension, $this->imagesExtensions())) {
            return Media::IMAGE;
        }

        if (in_array($extension, $this->audiosExtensions())) {
            return Media::AUDIO;
        }

        if (in_array($extension, $this->videosExtensions())) {
            return Media::VIDEO;
        }

        return Media::OTHER;
    }
172610
static private function setMimeType()
	{
		$UserBrowser = '';
		if( preg_match( '@Opera(/| )([0-9].[0-9]{1,2})@', $_SERVER['HTTP_USER_AGENT'] ) )
			$UserBrowser = "Opera";
		elseif( preg_match( '@MSIE ([0-9].[0-9]{1,2})@', $_SERVER['HTTP_USER_AGENT'] ) )
			$UserBrowser = "IE";
		$mime_type = ( $UserBrowser == 'IE' || $UserBrowser == 'Opera' ) ? 'application/octetstream' : 'application/octet-stream';
		header( "Content-Type: ". $mime_type);
	}
541298
protected function mimeType() {

		$mime_type = get_post_mime_type( $this->post );

		if ( ! $mime_type ) {
			$mime_type = $this->raw( 'mime_type' );
		}

		return $mime_type ? esc_html( $mime_type ) : '';
	}
1031550
public function getMime()
    {
        $mimes = $this->getMimes();
        $ext = strtolower($this->getExtension());

        if (isset($mimes[ $ext ])) {
            return $mimes[ $ext ];
        }

        return false;
    }
834024
public function getMimeType()
	{
		$field	= $this->headers->getField( 'Content-Type' );
		$parts	= explode( ';', $field->getValue() );
		return $parts[0];
	}
731497
public function getClientMediaType() : string
    {
        return ($this->clientFilename === null) ? $this->fileStream->getMimeType() : $this->retrieveFileMimeType($this->clientFilename);
    }
1135554
public function getMime()
    {
      if (!$this->mime) {
        $this->mime = $this->getImageMime($this->_files['tmp_name']);
      }

      return $this->mime;
    }
1347974
public static function getMimetype($filename): string
    {
        $extension = pathinfo($filename, PATHINFO_EXTENSION);
        $extension = strtolower($extension);
        return !empty(self::$mimetypes[$extension]) ? self::$mimetypes[$extension] : '';
    }
720100
public String getMimeType()
   {
      if (mediaType == null || untrustedAgent)
      {
         return mimeTypeResolver.getMimeType(fileName);
      }

      return mediaType.getType() + "/" + mediaType.getSubtype();
   }
1215804
public function getMimeType()
    {
        if ($this->exists()) {
            $finfo = new \finfo(FILEINFO_MIME_TYPE | FILEINFO_PRESERVE_ATIME);
            $mime = $finfo->file($this->getRealPath());
            return $mime;
        }
        return null;
    }
569334
public function getMessageType() {
    // 
    $messageType = static::types()[$this->type];
    // If not incoming
    if ($this->type != static::INCOMING) {
      // Change to uppercase
      $messageType = strtoupper($messageType);
    }
    // Return
    return $messageType;
  }
782747
protected function _getMimetype($extension)
    {
        $mimetypes = $this->_getMimetypes();

        return isset($mimetypes[$extension]) ? $mimetypes[$extension] : null;
    }
231720
public function getMimeType()
    {
        // return mime type ala mimetype extension
        $finfo = finfo_open(FILEINFO_MIME);

        $mime = finfo_file($finfo, $this->getFullPath());

        return $mime;
    }