Skip to content

Instantly share code, notes, and snippets.

@dptsolutions
Forked from markwhitaker/MimeTypes.java
Last active April 6, 2021 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save dptsolutions/e58a4afd00dc2b072f8e819465a98195 to your computer and use it in GitHub Desktop.
Save dptsolutions/e58a4afd00dc2b072f8e819465a98195 to your computer and use it in GitHub Desktop.
Standard MIME type constants ready to use in a Kotlin project
object MimeTypes {
object Application {
const val ATOM_XML = "application/atom+xml"
const val ATOMCAT_XML = "application/atomcat+xml"
const val ECMASCRIPT = "application/ecmascript"
const val JAVA_ARCHIVE = "application/java-archive"
const val JAVASCRIPT = "application/javascript"
const val JSON = "application/json"
const val MP4 = "application/mp4"
const val OCTET_STREAM = "application/octet-stream"
const val PDF = "application/pdf"
const val PKCS_10 = "application/pkcs10"
const val PKCS_7_MIME = "application/pkcs7-mime"
const val PKCS_7_SIGNATURE = "application/pkcs7-signature"
const val PKCS_8 = "application/pkcs8"
const val POSTSCRIPT = "application/postscript"
const val RDF_XML = "application/rdf+xml"
const val RSS_XML = "application/rss+xml"
const val RTF = "application/rtf"
const val SMIL_XML = "application/smil+xml"
const val X_FONT_OTF = "application/x-font-otf"
const val X_FONT_TTF = "application/x-font-ttf"
const val X_FONT_WOFF = "application/x-font-woff"
const val X_PKCS_12 = "application/x-pkcs12"
const val X_SHOCKWAVE_FLASH = "application/x-shockwave-flash"
const val X_SILVERLIGHT_APP = "application/x-silverlight-app"
const val XHTML_XML = "application/xhtml+xml"
const val XML = "application/xml"
const val XML_DTD = "application/xml-dtd"
const val XSLT_XML = "application/xslt+xml"
const val ZIP = "application/zip"
}
object Audio {
const val MIDI = "audio/midi"
const val MP4 = "audio/mp4"
const val MPEG = "audio/mpeg"
const val OGG = "audio/ogg"
const val WEBM = "audio/webm"
const val X_AAC = "audio/x-aac"
const val X_AIFF = "audio/x-aiff"
const val X_MPEGURL = "audio/x-mpegurl"
const val X_MS_WMA = "audio/x-ms-wma"
const val X_WAV = "audio/x-wav"
}
object Image {
const val BMP = "image/bmp"
const val GIF = "image/gif"
const val JPEG = "image/jpeg"
const val PNG = "image/png"
const val SVG_XML = "image/svg+xml"
const val TIFF = "image/tiff"
const val WEBP = "image/webp"
}
object Text {
const val CSS = "text/css"
const val CSV = "text/csv"
const val HTML = "text/html"
const val PLAIN = "text/plain"
const val RICH_TEXT = "text/richtext"
const val SGML = "text/sgml"
const val YAML = "text/yaml"
}
object Video {
const val THREEGPP = "video/3gpp"
const val H264 = "video/h264"
const val MP4 = "video/mp4"
const val MPEG = "video/mpeg"
const val OGG = "video/ogg"
const val QUICKTIME = "video/quicktime"
const val WEBM = "video/webm"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment