[mime] Compile list of mime-types.
This commit is contained in:
parent
2793137d0f
commit
f1528ce48b
1 changed files with 64 additions and 0 deletions
|
@ -63,6 +63,8 @@ const MimeTypeZip = "application/zip"
|
|||
const MimeTypeRaw = "application/octet-stream"
|
||||
|
||||
|
||||
|
||||
|
||||
var MimeTypesByExtension = map[string]string {
|
||||
|
||||
// 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,
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue