media: Add PDF MIME type

This commit is contained in:
Bjørn Erik Pedersen
2021-12-21 09:39:05 +01:00
parent 425c7d90f0
commit cdc73526a8
3 changed files with 208 additions and 8 deletions

View File

@@ -169,7 +169,6 @@ func (m Type) IsText() bool {
switch m.SubType {
case "javascript", "json", "rss", "xml", "svg", TOMLType.SubType, YAMLType.SubType:
return true
}
return false
}
@@ -239,6 +238,9 @@ var (
TrueTypeFontType = newMediaType("font", "ttf", []string{"ttf"})
OpenTypeFontType = newMediaType("font", "otf", []string{"otf"})
// Common document types
PDFType = newMediaType("application", "pdf", []string{"pdf"})
// Common video types
AVIType = newMediaType("video", "x-msvideo", []string{"avi"})
MPEGType = newMediaType("video", "mpeg", []string{"mpg", "mpeg"})
@@ -282,6 +284,7 @@ var DefaultTypes = Types{
GPPType,
OpenTypeFontType,
TrueTypeFontType,
PDFType,
}
func init() {