response/lib/mime-tpyes.js

72 lines
1.6 KiB
JavaScript
Raw Normal View History

2023-10-31 12:28:27 +08:00
//
export const CHARSET_TYPES = {
2023-10-31 12:44:51 +08:00
html: 1,
txt: 1,
css: 1,
scss: 1,
xml: 1,
js: 1,
json: 1,
webmanifest: 1
2023-10-31 12:28:27 +08:00
}
export const MIME_TYPES = {
html: 'text/html',
2023-10-31 12:44:51 +08:00
xml: 'text/xml',
2023-10-31 12:28:27 +08:00
txt: 'text/plain',
css: 'text/css',
2023-10-31 12:44:51 +08:00
js: 'application/javascript',
json: 'application/json',
webmanifest: 'application/json',
wast: 'application/wast',
wasm: 'application/wasm',
2023-10-31 12:28:27 +08:00
gif: 'image/gif',
jpg: 'image/jpeg',
webp: 'image/webp',
tiff: 'image/tiff',
png: 'image/png',
2023-10-31 12:44:51 +08:00
apng: 'image/apng',
2023-10-31 12:28:27 +08:00
svg: 'image/svg+xml',
ico: 'image/x-icon',
bmp: 'image/x-ms-bmp',
2023-10-31 12:44:51 +08:00
mid: 'audio/midi',
midi: 'audio/x-midi',
2023-10-31 12:28:27 +08:00
mp3: 'audio/mpeg',
ogg: 'audio/ogg',
m4a: 'audio/x-m4a',
mp4: 'video/mp4',
webm: 'video/webm',
2023-10-31 12:44:51 +08:00
2023-10-31 12:28:27 +08:00
ttf: 'font/font-ttf',
woff: 'font/font-woff',
woff2: 'font/font-woff2',
2023-10-31 12:44:51 +08:00
zip: 'application/zip',
'7zip': 'application/zip',
rar: 'application/rar',
gz: 'application/x-gzip',
tar: 'application/x-tar',
tgz: 'application/x-tar',
pdf: 'application/pdf',
psd: 'application/x-photoshop',
doc: 'application/msword',
xls: 'application/vnd.ms-excel',
ppt: 'application/vnd.ms-powerpoint',
docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
2023-10-31 12:28:27 +08:00
stream: 'application/octet-stream'
}
MIME_TYPES.vue = MIME_TYPES.js
MIME_TYPES.scss = MIME_TYPES.css
MIME_TYPES.htm = MIME_TYPES.html
MIME_TYPES.jpeg = MIME_TYPES.jpg
MIME_TYPES.tif = MIME_TYPES.tiff