defineMimeType

View Source

Summary

Registers a custom MIME type for one or more file extensions.

Use this to add support for file extensions not included in the defaults, or to override the behavior of existing extensions.

Signature

function defineMimeType(definition: MimeTypeDefinition): void;

Example

defineMimeType({
  extensions: ['x-myformat'],
  mimeType: 'application/x-myformat',
})

Params

definition

The MIME type definition to register