Documentation Language: Swift

Enumeration

MIMEType

MIME type mapping for static file serving.

enum MIMEType

Overview

This enumeration provides MIME type mappings for common file types served in static documentation. Each case includes appropriate charset declarations where applicable.

Overview

The MIME type determines how browsers and HTTP clients interpret file content. This enumeration covers text formats, images, fonts, and multimedia commonly found in documentation sites.

Topics

Getting MIME Types

?
from(fileExtension:)

Determines the MIME type from a file extension.

Text Formats

E
MIMEType.html

HTML document with UTF-8 character encoding.

E
MIMEType.css

Cascading Style Sheet with UTF-8 character encoding.

E
MIMEType.javascript

JavaScript source code with UTF-8 character encoding.

E
MIMEType.plain

Plain text document with UTF-8 character encoding.

E
MIMEType.xml

XML document with UTF-8 character encoding.

Application Formats

E
MIMEType.json

JSON data with UTF-8 character encoding.

E
MIMEType.pdf

Portable Document Format (PDF) file.

E
MIMEType.zip

ZIP archive file.

E
MIMEType.octetStream

Generic binary data stream (fallback for unknown types).

Image Formats

E
MIMEType.png

Portable Network Graphics (PNG) image.

E
MIMEType.jpeg

JPEG image format.

E
MIMEType.gif

Graphics Interchange Format (GIF) image.

E
MIMEType.svg

Scalable Vector Graphics (SVG) image.

E
MIMEType.webp

WebP image format.

E
MIMEType.ico

Icon image format (typically .ico files).

Font Formats

E
MIMEType.woff

Web Open Font Format (WOFF) font.

E
MIMEType.woff2

Web Open Font Format 2.0 (WOFF2) font.

E
MIMEType.ttf

TrueType Font (TTF) format.

E
MIMEType.otf

OpenType Font (OTF) format.

Multimedia Formats

E
MIMEType.mp4

MPEG-4 video format.

E
MIMEType.webm

WebM video format.

E
MIMEType.mp3

MPEG audio format (MP3).

E
MIMEType.wav

Waveform Audio Format (WAV).

Initializers

Default Implementations

Relationships

Conforms To