Skip to content

Documentation / base / mimeTypeOf

Function: mimeTypeOf()

mimeTypeOf(ext): string

Defined in: libs/base/src/vfs/common.ts:324

Gets the MIME type based on a file extension.

Parameters

ext

string

File extension (e.g., "png", ".jpg").

Returns

string

The corresponding MIME type or 'application/octet-stream' if unknown.

Released under the MIT License.