[mime] Compile list of mime-types.

This commit is contained in:
Ciprian Dorin Craciun 2021-12-17 18:54:51 +02:00
parent 2793137d0f
commit f1528ce48b

View file

@ -63,6 +63,8 @@ const MimeTypeZip = "application/zip"
const MimeTypeRaw = "application/octet-stream" const MimeTypeRaw = "application/octet-stream"
var MimeTypesByExtension = map[string]string { var MimeTypesByExtension = map[string]string {
// NOTE: Based on: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types // NOTE: Based on: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
@ -129,3 +131,65 @@ var MimeTypesByExtension = map[string]string {
} }
var MimeTypes = []string {
MimeTypeText,
MimeTypeCsv,
MimeTypeHtml,
MimeTypeCss,
MimeTypeJs,
MimeTypeJson,
MimeTypeXml,
MimeTypeXslt,
MimeTypeXhtml,
MimeTypeSvg,
MimeTypePng,
MimeTypeJpeg,
MimeTypeWebp,
MimeTypeGif,
MimeTypeIco,
MimeTypeBmp,
MimeTypeTiff,
MimeTypeApng,
MimeTypeAvif,
MimeTypeAvifSequence,
MimeTypeHeic,
MimeTypeHeicSequence,
MimeTypeHeif,
MimeTypeHeifSequence,
MimeTypeOtf,
MimeTypeTtf,
MimeTypeWoff,
MimeTypeWoff2,
MimeTypeWav,
MimeTypeMidi,
MimeTypeAac,
MimeTypeOpus,
MimeTypeAudioMpeg,
MimeTypeAudioWebm,
MimeTypeAudioOgg,
MimeTypeAvi,
MimeTypeMp4,
MimeTypeVideoMpeg,
MimeTypeVideoWebm,
MimeTypeVideoOgg,
MimeTypePdf,
MimeTypePs,
MimeTypeIcs,
MimeTypeZip,
MimeTypeRaw,
}