DEFAULT_FILE_EXTENSION

Default file extension

Description

Returns the default file extension associated with the given MIME type.

Function signature

DEFAULT_FILE_EXTENSION(mime-type: String) => String

Parameter

Description

MIME-type

MIME-type

Examples

Formula

Return value

DEFAULT_FILE_EXTENSION("application/json")

json

DEFAULT_FILE_EXTENSION("application/javascript")

js

DEFAULT_FILE_EXTENSION("text/plain")

txt

DEFAULT_FILE_EXTENSION("video/mp4")

mp4

DEFAULT_FILE_EXTENSION("application/octet-stream")

bin