-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmime.go
87 lines (85 loc) · 7.91 KB
/
mime.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
package html
type MimeType struct {
Description string
Mime string
}
var (
// go:nofmt
Mimes = map[string]MimeType{
".aac": {Description: "AAC audio", Mime: "audio/aac"},
".abw": {Description: "AbiWord document", Mime: "application/x-abiword"},
".arc": {Description: "Archive document (multiple files embedded)", Mime: "application/x-freearc"},
".avi": {Description: "AVI: Audio Video Interleave", Mime: "video/x-msvideo"},
".azw": {Description: "Amazon Kindle eBook format", Mime: "application/vnd.amazon.ebook"},
".bin": {Description: "Any kind of binary data", Mime: "application/octet-stream"},
".bmp": {Description: "Windows OS/2 Bitmap Graphics", Mime: "image/bmp"},
".bz": {Description: "BZip archive", Mime: "application/x-bzip"},
".bz2": {Description: "BZip2 archive", Mime: "application/x-bzip2"},
".csh": {Description: "C-Shell script", Mime: "application/x-csh"},
".css": {Description: "Cascading Style Sheets (CSS)", Mime: "text/css"},
".csv": {Description: "Comma-separated values (CSV)", Mime: "text/csv"},
".doc": {Description: "Microsoft Word", Mime: "application/msword"},
".docx": {Description: "Microsoft Word (OpenXML)", Mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"},
".eot": {Description: "MS Embedded OpenType fonts", Mime: "application/vnd.ms-fontobject"},
".epub": {Description: "Electronic publication (EPUB)", Mime: "application/epub+zip"},
".gz": {Description: "GZip Compressed Archive", Mime: "application/gzip"},
".gif": {Description: "Graphics Interchange Format (GIF)", Mime: "image/gif"},
".htm": {Description: "HyperText Markup Language (HTML)", Mime: "text/html"},
".html": {Description: "HyperText Markup Language (HTML)", Mime: "text/html"},
".ico": {Description: "Icon format", Mime: "image/vnd.microsoft.icon"},
".ics": {Description: "iCalendar format", Mime: "text/calendar"},
".jar": {Description: "Java Archive (JAR)", Mime: "application/java-archive"},
".jpeg": {Description: "JPEG images", Mime: "image/jpeg"},
".jpg": {Description: "JPEG images", Mime: "image/jpeg"},
".js": {Description: "JavaScript", Mime: "text/javascript, per the following specifications:"},
".json": {Description: "JSON format", Mime: "application/json"},
".jsonld": {Description: "JSON-LD format", Mime: "application/ld+json"},
".midi": {Description: "Musical Instrument Digital Interface (MIDI)", Mime: "audio/midi audio/x-midi"},
".mjs": {Description: "JavaScript module", Mime: "text/javascript"},
".mp3": {Description: "MP3 audio", Mime: "audio/mpeg"},
".cda": {Description: "CD audio", Mime: "application/x-cdf"},
".mp4": {Description: "MP4 audio", Mime: "video/mp4"},
".mpeg": {Description: "MPEG Video", Mime: "video/mpeg"},
".mpkg": {Description: "Apple Installer Package", Mime: "application/vnd.apple.installer+xml"},
".odp": {Description: "OpenDocument presentation document", Mime: "application/vnd.oasis.opendocument.presentation"},
".ods": {Description: "OpenDocument spreadsheet document", Mime: "application/vnd.oasis.opendocument.spreadsheet"},
".odt": {Description: "OpenDocument text document", Mime: "application/vnd.oasis.opendocument.text"},
".oga": {Description: "OGG audio", Mime: "audio/ogg"},
".ogv": {Description: "OGG video", Mime: "video/ogg"},
".ogx": {Description: "OGG", Mime: "application/ogg"},
".opus": {Description: "Opus audio", Mime: "audio/opus"},
".otf": {Description: "OpenType font", Mime: "font/otf"},
".png": {Description: "Portable Network Graphics", Mime: "image/png"},
".pdf": {Description: "Adobe Portable Document Format (PDF)", Mime: "application/pdf"},
".php": {Description: "Hypertext Preprocessor (Personal Home Page)", Mime: "application/x-httpd-php"},
".ppt": {Description: "Microsoft PowerPoint", Mime: "application/vnd.ms-powerpoint"},
".pptx": {Description: "Microsoft PowerPoint (OpenXML)", Mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation"},
".rar": {Description: "RAR archive", Mime: "application/vnd.rar"},
".rtf": {Description: "Rich Text Format (RTF)", Mime: "application/rtf"},
".sh": {Description: "Bourne shell script", Mime: "application/x-sh"},
".svg": {Description: "Scalable Vector Graphics (SVG)", Mime: "image/svg+xml"},
".swf": {Description: "Small web format (SWF) or Adobe Flash document", Mime: "application/x-shockwave-flash"},
".tar": {Description: "Tape Archive (TAR)", Mime: "application/x-tar"},
".tif": {Description: "Tagged Image File Format (TIFF)", Mime: "image/tiff"},
".tiff": {Description: "Tagged Image File Format (TIFF)", Mime: "image/tiff"},
".ts": {Description: "MPEG transport stream", Mime: "video/mp2t"},
".ttf": {Description: "TrueType Font", Mime: "font/ttf"},
".txt": {Description: "Text, (generally ASCII or ISO 8859-n)", Mime: "text/plain"},
".vsd": {Description: "Microsoft Visio", Mime: "application/vnd.visio"},
".wav": {Description: "Waveform Audio Format", Mime: "audio/wav"},
".weba": {Description: "WEBM audio", Mime: "audio/webm"},
".webm": {Description: "WEBM video", Mime: "video/webm"},
".webp": {Description: "WEBP image", Mime: "image/webp"},
".woff": {Description: "Web Open Font Format (WOFF)", Mime: "font/woff"},
".woff2": {Description: "Web Open Font Format (WOFF)", Mime: "font/woff2"},
".xhtml": {Description: "XHTML", Mime: "application/xhtml+xml"},
".xls": {Description: "Microsoft Excel", Mime: "application/vnd.ms-excel"},
".xlsx": {Description: "Microsoft Excel (OpenXML)", Mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},
".xml": {Description: "XML", Mime: "application/xml"},
".xul": {Description: "XUL", Mime: "application/vnd.mozilla.xul+xml"},
".zip": {Description: "ZIP archive", Mime: "application/zip"},
".3gp": {Description: "3GPP audio/video container", Mime: "video/3gpp"},
".7z": {Description: "7-zip archive", Mime: "application/x-7z-compressed"},
}
// go:fmt
)