Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace MimeTypeUtils

Index

Functions

  • getMIMETypeFromExtension(extension: undefined | string): string
  • Determines the file extension's corresponding MIME type or 'application/unknown' if none match

    example
    getMIMETypeFromExtension('.eml') // 'message/rfc822'
    getMIMETypeFromExtension(undefined) // 'application/unknown'

    Parameters

    • extension: undefined | string

      a file extension

    Returns string

    the corresponding MIME type or 'application/unknown'

Generated using TypeDoc