-
Notifications
You must be signed in to change notification settings - Fork 0
/
export_mime.go
348 lines (347 loc) · 16.3 KB
/
export_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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
package tools
var contentTypeMap = []map[string]string{
{"type": "__default__", "mime": "application/octet-stream"},
{"type": ".tif", "mime": "image/tiff"},
{"type": ".001", "mime": "application/x-001"},
{"type": ".301", "mime": "application/x-301"},
{"type": ".323", "mime": "text/h323"},
{"type": ".906", "mime": "application/x-906"},
{"type": ".907", "mime": "drawing/907"},
{"type": ".a11", "mime": "application/x-a11"},
{"type": ".acp", "mime": "audio/x-mei-aac"},
{"type": ".ai", "mime": "application/postscript"},
{"type": ".aif", "mime": "audio/aiff"},
{"type": ".aifc", "mime": "audio/aiff"},
{"type": ".aiff", "mime": "audio/aiff"},
{"type": ".anv", "mime": "application/x-anv"},
{"type": ".asa", "mime": "text/asa"},
{"type": ".asf", "mime": "video/x-ms-asf"},
{"type": ".asp", "mime": "text/asp"},
{"type": ".asx", "mime": "video/x-ms-asf"},
{"type": ".au", "mime": "audio/basic"},
{"type": ".avi", "mime": "video/avi"},
{"type": ".awf", "mime": "application/vnd.adobe.workflow"},
{"type": ".biz", "mime": "text/xml"},
{"type": ".bmp", "mime": "application/x-bmp"},
{"type": ".bot", "mime": "application/x-bot"},
{"type": ".c4t", "mime": "application/x-c4t"},
{"type": ".c90", "mime": "application/x-c90"},
{"type": ".cal", "mime": "application/x-cals"},
{"type": ".cat", "mime": "application/vnd.ms-pki.seccat"},
{"type": ".cdf", "mime": "application/x-netcdf"},
{"type": ".cdr", "mime": "application/x-cdr"},
{"type": ".cel", "mime": "application/x-cel"},
{"type": ".cer", "mime": "application/x-x509-ca-cert"},
{"type": ".cg4", "mime": "application/x-g4"},
{"type": ".cgm", "mime": "application/x-cgm"},
{"type": ".cit", "mime": "application/x-cit"},
{"type": ".class", "mime": "java/*"},
{"type": ".cml", "mime": "text/xml"},
{"type": ".cmp", "mime": "application/x-cmp"},
{"type": ".cmx", "mime": "application/x-cmx"},
{"type": ".cot", "mime": "application/x-cot"},
{"type": ".crl", "mime": "application/pkix-crl"},
{"type": ".crt", "mime": "application/x-x509-ca-cert"},
{"type": ".csi", "mime": "application/x-csi"},
{"type": ".css", "mime": "text/css"},
{"type": ".cut", "mime": "application/x-cut"},
{"type": ".dbf", "mime": "application/x-dbf"},
{"type": ".dbm", "mime": "application/x-dbm"},
{"type": ".dbx", "mime": "application/x-dbx"},
{"type": ".dcd", "mime": "text/xml"},
{"type": ".dcx", "mime": "application/x-dcx"},
{"type": ".der", "mime": "application/x-x509-ca-cert"},
{"type": ".dgn", "mime": "application/x-dgn"},
{"type": ".dib", "mime": "application/x-dib"},
{"type": ".dll", "mime": "application/x-msdownload"},
{"type": ".doc", "mime": "application/msword"},
{"type": ".dot", "mime": "application/msword"},
{"type": ".drw", "mime": "application/x-drw"},
{"type": ".dtd", "mime": "text/xml"},
{"type": ".dwf", "mime": "Model/vnd.dwf"},
{"type": ".dwf", "mime": "application/x-dwf"},
{"type": ".dwg", "mime": "application/x-dwg"},
{"type": ".dxb", "mime": "application/x-dxb"},
{"type": ".dxf", "mime": "application/x-dxf"},
{"type": ".edn", "mime": "application/vnd.adobe.edn"},
{"type": ".emf", "mime": "application/x-emf"},
{"type": ".eml", "mime": "message/rfc822"},
{"type": ".ent", "mime": "text/xml"},
{"type": ".epi", "mime": "application/x-epi"},
{"type": ".eps", "mime": "application/x-ps"},
{"type": ".eps", "mime": "application/postscript"},
{"type": ".etd", "mime": "application/x-ebx"},
{"type": ".exe", "mime": "application/x-msdownload"},
{"type": ".fax", "mime": "image/fax"},
{"type": ".fdf", "mime": "application/vnd.fdf"},
{"type": ".fif", "mime": "application/fractals"},
{"type": ".fo", "mime": "text/xml"},
{"type": ".frm", "mime": "application/x-frm"},
{"type": ".g4", "mime": "application/x-g4"},
{"type": ".gbr", "mime": "application/x-gbr"},
{"type": ".", "mime": "application/x-"},
{"type": ".gif", "mime": "image/gif"},
{"type": ".gl2", "mime": "application/x-gl2"},
{"type": ".gp4", "mime": "application/x-gp4"},
{"type": ".hgl", "mime": "application/x-hgl"},
{"type": ".hmr", "mime": "application/x-hmr"},
{"type": ".hpg", "mime": "application/x-hpgl"},
{"type": ".hpl", "mime": "application/x-hpl"},
{"type": ".hqx", "mime": "application/mac-binhex40"},
{"type": ".hrf", "mime": "application/x-hrf"},
{"type": ".hta", "mime": "application/hta"},
{"type": ".htc", "mime": "text/x-component"},
{"type": ".htm", "mime": "text/html"},
{"type": ".html", "mime": "text/html"},
{"type": ".htt", "mime": "text/webviewhtml"},
{"type": ".htx", "mime": "text/html"},
{"type": ".icb", "mime": "application/x-icb"},
{"type": ".ico", "mime": "image/x-icon"},
{"type": ".ico", "mime": "application/x-ico"},
{"type": ".iff", "mime": "application/x-iff"},
{"type": ".ig4", "mime": "application/x-g4"},
{"type": ".igs", "mime": "application/x-igs"},
{"type": ".iii", "mime": "application/x-iphone"},
{"type": ".img", "mime": "application/x-img"},
{"type": ".ins", "mime": "application/x-internet-signup"},
{"type": ".isp", "mime": "application/x-internet-signup"},
{"type": ".IVF", "mime": "video/x-ivf"},
{"type": ".java", "mime": "java/*"},
{"type": ".jfif", "mime": "image/jpeg"},
{"type": ".jpe", "mime": "image/jpeg"},
{"type": ".jpe", "mime": "application/x-jpe"},
{"type": ".jpeg", "mime": "image/jpeg"},
{"type": ".jpg", "mime": "image/jpeg"},
{"type": ".jpg", "mime": "application/x-jpg"},
{"type": ".js", "mime": "application/x-javascript"},
{"type": ".jsp", "mime": "text/html"},
{"type": ".la1", "mime": "audio/x-liquid-file"},
{"type": ".lar", "mime": "application/x-laplayer-reg"},
{"type": ".latex", "mime": "application/x-latex"},
{"type": ".lavs", "mime": "audio/x-liquid-secure"},
{"type": ".lbm", "mime": "application/x-lbm"},
{"type": ".lmsff", "mime": "audio/x-la-lms"},
{"type": ".ls", "mime": "application/x-javascript"},
{"type": ".ltr", "mime": "application/x-ltr"},
{"type": ".m1v", "mime": "video/x-mpeg"},
{"type": ".m2v", "mime": "video/x-mpeg"},
{"type": ".m3u", "mime": "audio/mpegurl"},
{"type": ".m4e", "mime": "video/mpeg4"},
{"type": ".mac", "mime": "application/x-mac"},
{"type": ".man", "mime": "application/x-troff-man"},
{"type": ".math", "mime": "text/xml"},
{"type": ".mdb", "mime": "application/msaccess"},
{"type": ".mdb", "mime": "application/x-mdb"},
{"type": ".mfp", "mime": "application/x-shockwave-flash"},
{"type": ".mht", "mime": "message/rfc822"},
{"type": ".mhtml", "mime": "message/rfc822"},
{"type": ".mi", "mime": "application/x-mi"},
{"type": ".mid", "mime": "audio/mid"},
{"type": ".midi", "mime": "audio/mid"},
{"type": ".mil", "mime": "application/x-mil"},
{"type": ".mml", "mime": "text/xml"},
{"type": ".mnd", "mime": "audio/x-musicnet-download"},
{"type": ".mns", "mime": "audio/x-musicnet-stream"},
{"type": ".mocha", "mime": "application/x-javascript"},
{"type": ".movie", "mime": "video/x-sgi-movie"},
{"type": ".mp1", "mime": "audio/mp1"},
{"type": ".mp2", "mime": "audio/mp2"},
{"type": ".mp2v", "mime": "video/mpeg"},
{"type": ".mp3", "mime": "audio/mp3"},
{"type": ".mp4", "mime": "video/mpeg4"},
{"type": ".mpa", "mime": "video/x-mpg"},
{"type": ".mpd", "mime": "application/vnd.ms-project"},
{"type": ".mpe", "mime": "video/x-mpeg"},
{"type": ".mpeg", "mime": "video/mpg"},
{"type": ".mpg", "mime": "video/mpg"},
{"type": ".mpga", "mime": "audio/rn-mpeg"},
{"type": ".mpp", "mime": "application/vnd.ms-project"},
{"type": ".mps", "mime": "video/x-mpeg"},
{"type": ".mpt", "mime": "application/vnd.ms-project"},
{"type": ".mpv", "mime": "video/mpg"},
{"type": ".mpv2", "mime": "video/mpeg"},
{"type": ".mpw", "mime": "application/vnd.ms-project"},
{"type": ".mpx", "mime": "application/vnd.ms-project"},
{"type": ".mtx", "mime": "text/xml"},
{"type": ".mxp", "mime": "application/x-mmxp"},
{"type": ".net", "mime": "image/pnetvue"},
{"type": ".nrf", "mime": "application/x-nrf"},
{"type": ".nws", "mime": "message/rfc822"},
{"type": ".odc", "mime": "text/x-ms-odc"},
{"type": ".out", "mime": "application/x-out"},
{"type": ".p10", "mime": "application/pkcs10"},
{"type": ".p12", "mime": "application/x-pkcs12"},
{"type": ".p7b", "mime": "application/x-pkcs7-certificates"},
{"type": ".p7c", "mime": "application/pkcs7-mime"},
{"type": ".p7m", "mime": "application/pkcs7-mime"},
{"type": ".p7r", "mime": "application/x-pkcs7-certreqresp"},
{"type": ".p7s", "mime": "application/pkcs7-signature"},
{"type": ".pc5", "mime": "application/x-pc5"},
{"type": ".pci", "mime": "application/x-pci"},
{"type": ".pcl", "mime": "application/x-pcl"},
{"type": ".pcx", "mime": "application/x-pcx"},
{"type": ".pdf", "mime": "application/pdf"},
{"type": ".pdf", "mime": "application/pdf"},
{"type": ".pdx", "mime": "application/vnd.adobe.pdx"},
{"type": ".pfx", "mime": "application/x-pkcs12"},
{"type": ".pgl", "mime": "application/x-pgl"},
{"type": ".pic", "mime": "application/x-pic"},
{"type": ".pko", "mime": "application/vnd.ms-pki.pko"},
{"type": ".pl", "mime": "application/x-perl"},
{"type": ".plg", "mime": "text/html"},
{"type": ".pls", "mime": "audio/scpls"},
{"type": ".plt", "mime": "application/x-plt"},
{"type": ".png", "mime": "image/png"},
{"type": ".png", "mime": "application/x-png"},
{"type": ".pot", "mime": "application/vnd.ms-powerpoint"},
{"type": ".ppa", "mime": "application/vnd.ms-powerpoint"},
{"type": ".ppm", "mime": "application/x-ppm"},
{"type": ".pps", "mime": "application/vnd.ms-powerpoint"},
{"type": ".ppt", "mime": "application/vnd.ms-powerpoint"},
{"type": ".ppt", "mime": "application/x-ppt"},
{"type": ".pr", "mime": "application/x-pr"},
{"type": ".prf", "mime": "application/pics-rules"},
{"type": ".prn", "mime": "application/x-prn"},
{"type": ".prt", "mime": "application/x-prt"},
{"type": ".ps", "mime": "application/x-ps"},
{"type": ".ps", "mime": "application/postscript"},
{"type": ".ptn", "mime": "application/x-ptn"},
{"type": ".pwz", "mime": "application/vnd.ms-powerpoint"},
{"type": ".r3t", "mime": "text/vnd.rn-realtext3d"},
{"type": ".ra", "mime": "audio/vnd.rn-realaudio"},
{"type": ".ram", "mime": "audio/x-pn-realaudio"},
{"type": ".ras", "mime": "application/x-ras"},
{"type": ".rat", "mime": "application/rat-file"},
{"type": ".rdf", "mime": "text/xml"},
{"type": ".rec", "mime": "application/vnd.rn-recording"},
{"type": ".red", "mime": "application/x-red"},
{"type": ".rgb", "mime": "application/x-rgb"},
{"type": ".rjs", "mime": "application/vnd.rn-realsystem-rjs"},
{"type": ".rjt", "mime": "application/vnd.rn-realsystem-rjt"},
{"type": ".rlc", "mime": "application/x-rlc"},
{"type": ".rle", "mime": "application/x-rle"},
{"type": ".rm", "mime": "application/vnd.rn-realmedia"},
{"type": ".rmf", "mime": "application/vnd.adobe.rmf"},
{"type": ".rmi", "mime": "audio/mid"},
{"type": ".rmj", "mime": "application/vnd.rn-realsystem-rmj"},
{"type": ".rmm", "mime": "audio/x-pn-realaudio"},
{"type": ".rmp", "mime": "application/vnd.rn-rn_music_package"},
{"type": ".rms", "mime": "application/vnd.rn-realmedia-secure"},
{"type": ".rmvb", "mime": "application/vnd.rn-realmedia-vbr"},
{"type": ".rmx", "mime": "application/vnd.rn-realsystem-rmx"},
{"type": ".rnx", "mime": "application/vnd.rn-realplayer"},
{"type": ".rp", "mime": "image/vnd.rn-realpix"},
{"type": ".rpm", "mime": "audio/x-pn-realaudio-plugin"},
{"type": ".rsml", "mime": "application/vnd.rn-rsml"},
{"type": ".rt", "mime": "text/vnd.rn-realtext"},
{"type": ".rtf", "mime": "application/msword"},
{"type": ".rtf", "mime": "application/x-rtf"},
{"type": ".rv", "mime": "video/vnd.rn-realvideo"},
{"type": ".sam", "mime": "application/x-sam"},
{"type": ".sat", "mime": "application/x-sat"},
{"type": ".sdp", "mime": "application/sdp"},
{"type": ".sdw", "mime": "application/x-sdw"},
{"type": ".sit", "mime": "application/x-stuffit"},
{"type": ".slb", "mime": "application/x-slb"},
{"type": ".sld", "mime": "application/x-sld"},
{"type": ".slk", "mime": "drawing/x-slk"},
{"type": ".smi", "mime": "application/smil"},
{"type": ".smil", "mime": "application/smil"},
{"type": ".smk", "mime": "application/x-smk"},
{"type": ".snd", "mime": "audio/basic"},
{"type": ".sol", "mime": "text/plain"},
{"type": ".sor", "mime": "text/plain"},
{"type": ".spc", "mime": "application/x-pkcs7-certificates"},
{"type": ".spl", "mime": "application/futuresplash"},
{"type": ".spp", "mime": "text/xml"},
{"type": ".ssm", "mime": "application/streamingmedia"},
{"type": ".sst", "mime": "application/vnd.ms-pki.certstore"},
{"type": ".stl", "mime": "application/vnd.ms-pki.stl"},
{"type": ".stm", "mime": "text/html"},
{"type": ".sty", "mime": "application/x-sty"},
{"type": ".svg", "mime": "text/xml"},
{"type": ".swf", "mime": "application/x-shockwave-flash"},
{"type": ".tdf", "mime": "application/x-tdf"},
{"type": ".tg4", "mime": "application/x-tg4"},
{"type": ".tga", "mime": "application/x-tga"},
{"type": ".tif", "mime": "image/tiff"},
{"type": ".tif", "mime": "application/x-tif"},
{"type": ".tiff", "mime": "image/tiff"},
{"type": ".tld", "mime": "text/xml"},
{"type": ".top", "mime": "drawing/x-top"},
{"type": ".torrent", "mime": "application/x-bittorrent"},
{"type": ".tsd", "mime": "text/xml"},
{"type": ".txt", "mime": "text/plain"},
{"type": ".uin", "mime": "application/x-icq"},
{"type": ".uls", "mime": "text/iuls"},
{"type": ".vcf", "mime": "text/x-vcard"},
{"type": ".vda", "mime": "application/x-vda"},
{"type": ".vdx", "mime": "application/vnd.visio"},
{"type": ".vml", "mime": "text/xml"},
{"type": ".vpg", "mime": "application/x-vpeg005"},
{"type": ".vsd", "mime": "application/vnd.visio"},
{"type": ".vsd", "mime": "application/x-vsd"},
{"type": ".vss", "mime": "application/vnd.visio"},
{"type": ".vst", "mime": "application/vnd.visio"},
{"type": ".vst", "mime": "application/x-vst"},
{"type": ".vsw", "mime": "application/vnd.visio"},
{"type": ".vsx", "mime": "application/vnd.visio"},
{"type": ".vtx", "mime": "application/vnd.visio"},
{"type": ".vxml", "mime": "text/xml"},
{"type": ".wav", "mime": "audio/wav"},
{"type": ".wax", "mime": "audio/x-ms-wax"},
{"type": ".wb1", "mime": "application/x-wb1"},
{"type": ".wb2", "mime": "application/x-wb2"},
{"type": ".wb3", "mime": "application/x-wb3"},
{"type": ".wbmp", "mime": "image/vnd.wap.wbmp"},
{"type": ".wiz", "mime": "application/msword"},
{"type": ".wk3", "mime": "application/x-wk3"},
{"type": ".wk4", "mime": "application/x-wk4"},
{"type": ".wkq", "mime": "application/x-wkq"},
{"type": ".wks", "mime": "application/x-wks"},
{"type": ".wm", "mime": "video/x-ms-wm"},
{"type": ".wma", "mime": "audio/x-ms-wma"},
{"type": ".wmd", "mime": "application/x-ms-wmd"},
{"type": ".wmf", "mime": "application/x-wmf"},
{"type": ".wml", "mime": "text/vnd.wap.wml"},
{"type": ".wmv", "mime": "video/x-ms-wmv"},
{"type": ".wmx", "mime": "video/x-ms-wmx"},
{"type": ".wmz", "mime": "application/x-ms-wmz"},
{"type": ".wp6", "mime": "application/x-wp6"},
{"type": ".wpd", "mime": "application/x-wpd"},
{"type": ".wpg", "mime": "application/x-wpg"},
{"type": ".wpl", "mime": "application/vnd.ms-wpl"},
{"type": ".wq1", "mime": "application/x-wq1"},
{"type": ".wr1", "mime": "application/x-wr1"},
{"type": ".wri", "mime": "application/x-wri"},
{"type": ".wrk", "mime": "application/x-wrk"},
{"type": ".ws", "mime": "application/x-ws"},
{"type": ".ws2", "mime": "application/x-ws"},
{"type": ".wsc", "mime": "text/scriptlet"},
{"type": ".wsdl", "mime": "text/xml"},
{"type": ".wvx", "mime": "video/x-ms-wvx"},
{"type": ".xdp", "mime": "application/vnd.adobe.xdp"},
{"type": ".xdr", "mime": "text/xml"},
{"type": ".xfd", "mime": "application/vnd.adobe.xfd"},
{"type": ".xfdf", "mime": "application/vnd.adobe.xfdf"},
{"type": ".xhtml", "mime": "text/html"},
{"type": ".xls", "mime": "application/vnd.ms-excel"},
{"type": ".xls", "mime": "application/x-xls"},
{"type": ".xlw", "mime": "application/x-xlw"},
{"type": ".xml", "mime": "text/xml"},
{"type": ".xpl", "mime": "audio/scpls"},
{"type": ".xq", "mime": "text/xml"},
{"type": ".xql", "mime": "text/xml"},
{"type": ".xquery", "mime": "text/xml"},
{"type": ".xsd", "mime": "text/xml"},
{"type": ".xsl", "mime": "text/xml"},
{"type": ".xslt", "mime": "text/xml"},
{"type": ".xwd", "mime": "application/x-xwd"},
{"type": ".x_b", "mime": "application/x-x_b"},
{"type": ".sis", "mime": "application/vnd.symbian.install"},
{"type": ".sisx", "mime": "application/vnd.symbian.install"},
{"type": ".x_t", "mime": "application/x-x_t"},
{"type": ".ipa", "mime": "application/vnd.iphone"},
{"type": ".apk", "mime": "application/vnd.android.package-archive"},
{"type": ".xap", "mime": "application/x-silverlight-app"},
}