Show More
@@ -1,177 +1,195 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2016-2019 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | import logging |
|
21 | 21 | |
|
22 | 22 | from pyramid.view import view_config |
|
23 | 23 | from pyramid.response import FileResponse |
|
24 | 24 | from pyramid.httpexceptions import HTTPFound, HTTPNotFound |
|
25 | 25 | |
|
26 | 26 | from rhodecode.apps._base import BaseAppView |
|
27 | 27 | from rhodecode.apps.file_store import utils |
|
28 | 28 | from rhodecode.apps.file_store.exceptions import ( |
|
29 | 29 | FileNotAllowedException, FileOverSizeException) |
|
30 | 30 | |
|
31 | 31 | from rhodecode.lib import helpers as h |
|
32 | 32 | from rhodecode.lib import audit_logger |
|
33 | 33 | from rhodecode.lib.auth import ( |
|
34 | 34 | CSRFRequired, NotAnonymous, HasRepoPermissionAny, HasRepoGroupPermissionAny, |
|
35 | 35 | LoginRequired) |
|
36 | from rhodecode.lib.vcs.conf.mtypes import get_mimetypes_db | |
|
36 | 37 | from rhodecode.model.db import Session, FileStore, UserApiKeys |
|
37 | 38 | |
|
38 | 39 | log = logging.getLogger(__name__) |
|
39 | 40 | |
|
40 | 41 | |
|
41 | 42 | class FileStoreView(BaseAppView): |
|
42 | 43 | upload_key = 'store_file' |
|
43 | 44 | |
|
44 | 45 | def load_default_context(self): |
|
45 | 46 | c = self._get_local_tmpl_context() |
|
46 | 47 | self.storage = utils.get_file_storage(self.request.registry.settings) |
|
47 | 48 | return c |
|
48 | 49 | |
|
50 | def _guess_type(self, file_name): | |
|
51 | """ | |
|
52 | Our own type guesser for mimetypes using the rich DB | |
|
53 | """ | |
|
54 | if not hasattr(self, 'db'): | |
|
55 | self.db = get_mimetypes_db() | |
|
56 | _content_type, _encoding = self.db.guess_type(file_name, strict=False) | |
|
57 | return _content_type, _encoding | |
|
58 | ||
|
49 | 59 | def _serve_file(self, file_uid): |
|
50 | 60 | |
|
51 | 61 | if not self.storage.exists(file_uid): |
|
52 | 62 | store_path = self.storage.store_path(file_uid) |
|
53 | 63 | log.debug('File with FID:%s not found in the store under `%s`', |
|
54 | 64 | file_uid, store_path) |
|
55 | 65 | raise HTTPNotFound() |
|
56 | 66 | |
|
57 | 67 | db_obj = FileStore().query().filter(FileStore.file_uid == file_uid).scalar() |
|
58 | 68 | if not db_obj: |
|
59 | 69 | raise HTTPNotFound() |
|
60 | 70 | |
|
61 | 71 | # private upload for user |
|
62 | 72 | if db_obj.check_acl and db_obj.scope_user_id: |
|
63 | 73 | log.debug('Artifact: checking scope access for bound artifact user: `%s`', |
|
64 | 74 | db_obj.scope_user_id) |
|
65 | 75 | user = db_obj.user |
|
66 | 76 | if self._rhodecode_db_user.user_id != user.user_id: |
|
67 | 77 | log.warning('Access to file store object forbidden') |
|
68 | 78 | raise HTTPNotFound() |
|
69 | 79 | |
|
70 | 80 | # scoped to repository permissions |
|
71 | 81 | if db_obj.check_acl and db_obj.scope_repo_id: |
|
72 | 82 | log.debug('Artifact: checking scope access for bound artifact repo: `%s`', |
|
73 | 83 | db_obj.scope_repo_id) |
|
74 | 84 | repo = db_obj.repo |
|
75 | 85 | perm_set = ['repository.read', 'repository.write', 'repository.admin'] |
|
76 | 86 | has_perm = HasRepoPermissionAny(*perm_set)(repo.repo_name, 'FileStore check') |
|
77 | 87 | if not has_perm: |
|
78 | 88 | log.warning('Access to file store object `%s` forbidden', file_uid) |
|
79 | 89 | raise HTTPNotFound() |
|
80 | 90 | |
|
81 | 91 | # scoped to repository group permissions |
|
82 | 92 | if db_obj.check_acl and db_obj.scope_repo_group_id: |
|
83 | 93 | log.debug('Artifact: checking scope access for bound artifact repo group: `%s`', |
|
84 | 94 | db_obj.scope_repo_group_id) |
|
85 | 95 | repo_group = db_obj.repo_group |
|
86 | 96 | perm_set = ['group.read', 'group.write', 'group.admin'] |
|
87 | 97 | has_perm = HasRepoGroupPermissionAny(*perm_set)(repo_group.group_name, 'FileStore check') |
|
88 | 98 | if not has_perm: |
|
89 | 99 | log.warning('Access to file store object `%s` forbidden', file_uid) |
|
90 | 100 | raise HTTPNotFound() |
|
91 | 101 | |
|
92 | 102 | FileStore.bump_access_counter(file_uid) |
|
93 | 103 | |
|
94 | 104 | file_path = self.storage.store_path(file_uid) |
|
95 | return FileResponse(file_path) | |
|
105 | content_type = 'application/octet-stream' | |
|
106 | content_encoding = None | |
|
107 | ||
|
108 | _content_type, _encoding = self._guess_type(file_path) | |
|
109 | if _content_type: | |
|
110 | content_type = _content_type | |
|
111 | ||
|
96 | 112 | # For file store we don't submit any session data, this logic tells the |
|
97 | 113 | # Session lib to skip it |
|
98 | 114 | setattr(self.request, '_file_response', True) |
|
115 | return FileResponse(file_path, request=self.request, | |
|
116 | content_type=content_type, content_encoding=content_encoding) | |
|
99 | 117 | |
|
100 | 118 | @LoginRequired() |
|
101 | 119 | @NotAnonymous() |
|
102 | 120 | @CSRFRequired() |
|
103 | 121 | @view_config(route_name='upload_file', request_method='POST', renderer='json_ext') |
|
104 | 122 | def upload_file(self): |
|
105 | 123 | self.load_default_context() |
|
106 | 124 | file_obj = self.request.POST.get(self.upload_key) |
|
107 | 125 | |
|
108 | 126 | if file_obj is None: |
|
109 | 127 | return {'store_fid': None, |
|
110 | 128 | 'access_path': None, |
|
111 | 129 | 'error': '{} data field is missing'.format(self.upload_key)} |
|
112 | 130 | |
|
113 | 131 | if not hasattr(file_obj, 'filename'): |
|
114 | 132 | return {'store_fid': None, |
|
115 | 133 | 'access_path': None, |
|
116 | 134 | 'error': 'filename cannot be read from the data field'} |
|
117 | 135 | |
|
118 | 136 | filename = file_obj.filename |
|
119 | 137 | |
|
120 | 138 | metadata = { |
|
121 | 139 | 'user_uploaded': {'username': self._rhodecode_user.username, |
|
122 | 140 | 'user_id': self._rhodecode_user.user_id, |
|
123 | 141 | 'ip': self._rhodecode_user.ip_addr}} |
|
124 | 142 | try: |
|
125 | 143 | store_uid, metadata = self.storage.save_file( |
|
126 | 144 | file_obj.file, filename, extra_metadata=metadata) |
|
127 | 145 | except FileNotAllowedException: |
|
128 | 146 | return {'store_fid': None, |
|
129 | 147 | 'access_path': None, |
|
130 | 148 | 'error': 'File {} is not allowed.'.format(filename)} |
|
131 | 149 | |
|
132 | 150 | except FileOverSizeException: |
|
133 | 151 | return {'store_fid': None, |
|
134 | 152 | 'access_path': None, |
|
135 | 153 | 'error': 'File {} is exceeding allowed limit.'.format(filename)} |
|
136 | 154 | |
|
137 | 155 | try: |
|
138 | 156 | entry = FileStore.create( |
|
139 | 157 | file_uid=store_uid, filename=metadata["filename"], |
|
140 | 158 | file_hash=metadata["sha256"], file_size=metadata["size"], |
|
141 | 159 | file_description=u'upload attachment', |
|
142 | 160 | check_acl=False, user_id=self._rhodecode_user.user_id |
|
143 | 161 | ) |
|
144 | 162 | Session().add(entry) |
|
145 | 163 | Session().commit() |
|
146 | 164 | log.debug('Stored upload in DB as %s', entry) |
|
147 | 165 | except Exception: |
|
148 | 166 | log.exception('Failed to store file %s', filename) |
|
149 | 167 | return {'store_fid': None, |
|
150 | 168 | 'access_path': None, |
|
151 | 169 | 'error': 'File {} failed to store in DB.'.format(filename)} |
|
152 | 170 | |
|
153 | 171 | return {'store_fid': store_uid, |
|
154 | 172 | 'access_path': h.route_path('download_file', fid=store_uid)} |
|
155 | 173 | |
|
156 | 174 | # ACL is checked by scopes, if no scope the file is accessible to all |
|
157 | 175 | @view_config(route_name='download_file') |
|
158 | 176 | def download_file(self): |
|
159 | 177 | self.load_default_context() |
|
160 | 178 | file_uid = self.request.matchdict['fid'] |
|
161 | 179 | log.debug('Requesting FID:%s from store %s', file_uid, self.storage) |
|
162 | 180 | return self._serve_file(file_uid) |
|
163 | 181 | |
|
164 | 182 | # in addition to @LoginRequired ACL is checked by scopes |
|
165 | 183 | @LoginRequired(auth_token_access=[UserApiKeys.ROLE_ARTIFACT_DOWNLOAD]) |
|
166 | 184 | @NotAnonymous() |
|
167 | 185 | @view_config(route_name='download_file_by_token') |
|
168 | 186 | def download_file_by_token(self): |
|
169 | 187 | """ |
|
170 | 188 | Special view that allows to access the download file by special URL that |
|
171 | 189 | is stored inside the URL. |
|
172 | 190 | |
|
173 | 191 | http://example.com/_file_store/token-download/TOKEN/FILE_UID |
|
174 | 192 | """ |
|
175 | 193 | self.load_default_context() |
|
176 | 194 | file_uid = self.request.matchdict['fid'] |
|
177 | 195 | return self._serve_file(file_uid) |
@@ -1,1206 +1,1221 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | # Copyright (C) 2014-2019 RhodeCode GmbH |
|
4 | 4 | # |
|
5 | 5 | # This program is free software: you can redistribute it and/or modify |
|
6 | 6 | # it under the terms of the GNU Affero General Public License, version 3 |
|
7 | 7 | # (only), as published by the Free Software Foundation. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU Affero General Public License |
|
15 | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 | 16 | # |
|
17 | 17 | # This program is dual-licensed. If you wish to learn more about the |
|
18 | 18 | # RhodeCode Enterprise Edition, including its added features, Support services, |
|
19 | 19 | # and proprietary license terms, please see https://rhodecode.com/licenses/ |
|
20 | 20 | |
|
21 | DEFAULTS = { | |
|
22 | 'encodings_map': {'.gz': 'gzip', | |
|
23 | '.Z': 'compress', | |
|
24 | '.bz2': 'bzip2', | |
|
25 | '.xz': 'xz'}, | |
|
26 | 'suffix_map': {'.svgz': '.svg.gz', | |
|
27 | '.tgz': '.tar.gz', | |
|
28 | '.taz': '.tar.gz', | |
|
29 | '.tz': '.tar.gz', | |
|
30 | '.tbz2': '.tar.bz2', | |
|
31 | '.txz': '.tar.xz'}, | |
|
32 | } | |
|
33 | ||
|
21 | 34 | TYPES_MAP = [ |
|
22 | 35 | {'.jpg': 'image/jpg', |
|
23 | 36 | '.mid': 'audio/midi', |
|
24 | 37 | '.midi': 'audio/midi', |
|
25 | 38 | '.pct': 'image/pict', |
|
26 | 39 | '.pic': 'image/pict', |
|
27 | 40 | '.pict': 'image/pict', |
|
28 | 41 | '.rtf': 'application/rtf', |
|
29 | 42 | '.xul': 'text/xul'}, |
|
30 | 43 | {'.123': 'application/vnd.lotus-1-2-3', |
|
31 | 44 | '.3dml': 'text/vnd.in3d.3dml', |
|
32 | 45 | '.3g2': 'video/3gpp2', |
|
33 | 46 | '.3gp': 'video/3gpp', |
|
34 | 47 | '.7z': 'application/x-7z-compressed', |
|
35 | 48 | '.ASM': 'text/x-nasm', |
|
36 | 49 | '.C': 'text/x-c++hdr', |
|
37 | 50 | '.COB': 'text/x-cobol', |
|
38 | 51 | '.CPP': 'text/x-c++hdr', |
|
39 | 52 | '.CPY': 'text/x-cobol', |
|
40 | 53 | '.F': 'text/x-fortran', |
|
41 | 54 | '.F90': 'text/x-fortran', |
|
42 | 55 | '.H': 'text/x-c++hdr', |
|
43 | 56 | '.R': 'text/S-plus', |
|
44 | 57 | '.Rd': 'text/x-r-doc', |
|
45 | 58 | '.S': 'text/S-plus', |
|
46 | 59 | '.[1234567]': 'application/x-troff', |
|
47 | 60 | '.a': 'application/octet-stream', |
|
48 | 61 | '.aab': 'application/x-authorware-bin', |
|
49 | 62 | '.aac': 'audio/x-aac', |
|
50 | 63 | '.aam': 'application/x-authorware-map', |
|
51 | 64 | '.aas': 'application/x-authorware-seg', |
|
52 | 65 | '.abap': 'text/x-abap', |
|
53 | 66 | '.abw': 'application/x-abiword', |
|
54 | 67 | '.ac': 'application/pkix-attr-cert', |
|
55 | 68 | '.acc': 'application/vnd.americandynamics.acc', |
|
56 | 69 | '.ace': 'application/x-ace-compressed', |
|
57 | 70 | '.acu': 'application/vnd.acucobol', |
|
58 | 71 | '.acutc': 'application/vnd.acucorp', |
|
59 | 72 | '.ada': 'text/x-ada', |
|
60 | 73 | '.adb': 'text/x-ada', |
|
61 | 74 | '.adp': 'audio/adpcm', |
|
62 | 75 | '.ads': 'text/x-ada', |
|
63 | 76 | '.aep': 'application/vnd.audiograph', |
|
64 | 77 | '.afm': 'application/x-font-type1', |
|
65 | 78 | '.afp': 'application/vnd.ibm.modcap', |
|
66 | 79 | '.ahead': 'application/vnd.ahead.space', |
|
67 | 80 | '.ahk': 'text/x-autohotkey', |
|
68 | 81 | '.ahkl': 'text/x-autohotkey', |
|
69 | 82 | '.ai': 'application/postscript', |
|
70 | 83 | '.aif': 'audio/x-aiff', |
|
71 | 84 | '.aifc': 'audio/x-aiff', |
|
72 | 85 | '.aiff': 'audio/x-aiff', |
|
73 | 86 | '.air': 'application/vnd.adobe.air-application-installer-package+zip', |
|
74 | 87 | '.ait': 'application/vnd.dvb.ait', |
|
75 | 88 | '.aj': 'text/x-aspectj', |
|
76 | 89 | '.ami': 'application/vnd.amiga.ami', |
|
77 | 90 | '.apk': 'application/vnd.android.package-archive', |
|
78 | 91 | '.application': 'application/x-ms-application', |
|
79 | 92 | '.apr': 'application/vnd.lotus-approach', |
|
80 | 93 | '.as': 'application/x-actionscript3', |
|
81 | 94 | '.asc': 'application/pgp-signature', |
|
82 | 95 | '.asf': 'video/x-ms-asf', |
|
83 | 96 | '.asm': 'text/x-asm', |
|
84 | 97 | '.aso': 'application/vnd.accpac.simply.aso', |
|
85 | 98 | '.aspx': 'application/x-aspx', |
|
86 | 99 | '.asx': 'video/x-ms-asf', |
|
87 | 100 | '.asy': 'text/x-asymptote', |
|
88 | 101 | '.atc': 'application/vnd.acucorp', |
|
89 | 102 | '.atom': 'application/atom+xml', |
|
90 | 103 | '.atomcat': 'application/atomcat+xml', |
|
91 | 104 | '.atomsvc': 'application/atomsvc+xml', |
|
92 | 105 | '.atx': 'application/vnd.antix.game-component', |
|
93 | 106 | '.au': 'audio/basic', |
|
94 | 107 | '.au3': 'text/x-autoit', |
|
95 | 108 | '.aux': 'text/x-tex', |
|
96 | 109 | '.avi': 'video/x-msvideo', |
|
97 | 110 | '.aw': 'application/applixware', |
|
98 | 111 | '.awk': 'application/x-awk', |
|
99 | 112 | '.azf': 'application/vnd.airzip.filesecure.azf', |
|
100 | 113 | '.azs': 'application/vnd.airzip.filesecure.azs', |
|
101 | 114 | '.azw': 'application/vnd.amazon.ebook', |
|
102 | 115 | '.b': 'application/x-brainfuck', |
|
103 | 116 | '.bas': 'text/x-vbnet', |
|
104 | 117 | '.bash': 'text/x-sh', |
|
105 | 118 | '.bat': 'application/x-msdownload', |
|
106 | 119 | '.bcpio': 'application/x-bcpio', |
|
107 | 120 | '.bdf': 'application/x-font-bdf', |
|
108 | 121 | '.bdm': 'application/vnd.syncml.dm+wbxml', |
|
109 | 122 | '.bed': 'application/vnd.realvnc.bed', |
|
110 | 123 | '.befunge': 'application/x-befunge', |
|
111 | 124 | '.bf': 'application/x-brainfuck', |
|
112 | 125 | '.bh2': 'application/vnd.fujitsu.oasysprs', |
|
113 | 126 | '.bin': 'application/octet-stream', |
|
114 | 127 | '.bmi': 'application/vnd.bmi', |
|
115 | 128 | '.bmp': 'image/bmp', |
|
116 | 129 | '.bmx': 'text/x-bmx', |
|
117 | 130 | '.boo': 'text/x-boo', |
|
118 | 131 | '.book': 'application/vnd.framemaker', |
|
119 | 132 | '.box': 'application/vnd.previewsystems.box', |
|
120 | 133 | '.boz': 'application/x-bzip2', |
|
121 | 134 | '.bpk': 'application/octet-stream', |
|
122 | 135 | '.btif': 'image/prs.btif', |
|
123 | 136 | '.bz': 'application/x-bzip', |
|
124 | 137 | '.bz2': 'application/x-bzip2', |
|
125 | 138 | '.c': 'text/x-c', |
|
126 | 139 | '.c++': 'text/x-c++hdr', |
|
127 | 140 | '.c++-objdump': 'text/x-cpp-objdump', |
|
128 | 141 | '.c-objdump': 'text/x-c-objdump', |
|
129 | 142 | '.c11amc': 'application/vnd.cluetrust.cartomobile-config', |
|
130 | 143 | '.c11amz': 'application/vnd.cluetrust.cartomobile-config-pkg', |
|
131 | 144 | '.c4d': 'application/vnd.clonk.c4group', |
|
132 | 145 | '.c4f': 'application/vnd.clonk.c4group', |
|
133 | 146 | '.c4g': 'application/vnd.clonk.c4group', |
|
134 | 147 | '.c4p': 'application/vnd.clonk.c4group', |
|
135 | 148 | '.c4u': 'application/vnd.clonk.c4group', |
|
136 | 149 | '.cab': 'application/vnd.ms-cab-compressed', |
|
137 | 150 | '.car': 'application/vnd.curl.car', |
|
138 | 151 | '.cat': 'application/vnd.ms-pki.seccat', |
|
139 | 152 | '.cc': 'text/x-c', |
|
140 | 153 | '.cct': 'application/x-director', |
|
141 | 154 | '.ccxml': 'application/ccxml+xml', |
|
142 | 155 | '.cdbcmsg': 'application/vnd.contact.cmsg', |
|
143 | 156 | '.cdf': 'application/x-netcdf', |
|
144 | 157 | '.cdkey': 'application/vnd.mediastation.cdkey', |
|
145 | 158 | '.cdmia': 'application/cdmi-capability', |
|
146 | 159 | '.cdmic': 'application/cdmi-container', |
|
147 | 160 | '.cdmid': 'application/cdmi-domain', |
|
148 | 161 | '.cdmio': 'application/cdmi-object', |
|
149 | 162 | '.cdmiq': 'application/cdmi-queue', |
|
150 | 163 | '.cdx': 'chemical/x-cdx', |
|
151 | 164 | '.cdxml': 'application/vnd.chemdraw+xml', |
|
152 | 165 | '.cdy': 'application/vnd.cinderella', |
|
153 | 166 | '.cer': 'application/pkix-cert', |
|
154 | 167 | '.ceylon': 'text/x-ceylon', |
|
155 | 168 | '.cfc': 'application/x-coldfusion', |
|
156 | 169 | '.cfg': 'text/x-ini', |
|
157 | 170 | '.cfm': 'application/x-coldfusion', |
|
158 | 171 | '.cfml': 'application/x-coldfusion', |
|
159 | 172 | '.cgm': 'image/cgm', |
|
160 | 173 | '.chat': 'application/x-chat', |
|
161 | 174 | '.chm': 'application/vnd.ms-htmlhelp', |
|
162 | 175 | '.chrt': 'application/vnd.kde.kchart', |
|
163 | 176 | '.cif': 'chemical/x-cif', |
|
164 | 177 | '.cii': 'application/vnd.anser-web-certificate-issue-initiation', |
|
165 | 178 | '.cil': 'application/vnd.ms-artgalry', |
|
166 | 179 | '.cl': 'text/x-common-lisp', |
|
167 | 180 | '.cla': 'application/vnd.claymore', |
|
168 | 181 | '.class': 'application/java-vm', |
|
169 | 182 | '.clj': 'text/x-clojure', |
|
170 | 183 | '.clkk': 'application/vnd.crick.clicker.keyboard', |
|
171 | 184 | '.clkp': 'application/vnd.crick.clicker.palette', |
|
172 | 185 | '.clkt': 'application/vnd.crick.clicker.template', |
|
173 | 186 | '.clkw': 'application/vnd.crick.clicker.wordbank', |
|
174 | 187 | '.clkx': 'application/vnd.crick.clicker', |
|
175 | 188 | '.clp': 'application/x-msclip', |
|
176 | 189 | '.cls': 'text/x-openedge', |
|
177 | 190 | '.cmake': 'text/x-cmake', |
|
178 | 191 | '.cmc': 'application/vnd.cosmocaller', |
|
179 | 192 | '.cmd': 'application/x-dos-batch', |
|
180 | 193 | '.cmdf': 'chemical/x-cmdf', |
|
181 | 194 | '.cml': 'chemical/x-cml', |
|
182 | 195 | '.cmp': 'application/vnd.yellowriver-custom-menu', |
|
183 | 196 | '.cmx': 'image/x-cmx', |
|
184 | 197 | '.cob': 'text/x-cobol', |
|
185 | 198 | '.cod': 'application/vnd.rim.cod', |
|
186 | 199 | '.coffee': 'text/coffeescript', |
|
187 | 200 | '.com': 'application/x-msdownload', |
|
188 | 201 | '.conf': 'text/plain', |
|
189 | 202 | '.cp': 'text/x-c++hdr', |
|
190 | 203 | '.cpio': 'application/x-cpio', |
|
191 | 204 | '.cpp': 'text/x-c', |
|
192 | 205 | '.cpp-objdump': 'text/x-cpp-objdump', |
|
193 | 206 | '.cpt': 'application/mac-compactpro', |
|
194 | 207 | '.cpy': 'text/x-cobol', |
|
195 | 208 | '.crd': 'application/x-mscardfile', |
|
196 | 209 | '.crl': 'application/pkix-crl', |
|
197 | 210 | '.croc': 'text/x-crocsrc', |
|
198 | 211 | '.crt': 'application/x-x509-ca-cert', |
|
199 | 212 | '.cryptonote': 'application/vnd.rig.cryptonote', |
|
200 | 213 | '.cs': 'text/x-csharp', |
|
201 | 214 | '.csh': 'application/x-csh', |
|
202 | 215 | '.csml': 'chemical/x-csml', |
|
203 | 216 | '.csp': 'application/vnd.commonspace', |
|
204 | 217 | '.css': 'text/css', |
|
205 | 218 | '.cst': 'application/x-director', |
|
206 | 219 | '.csv': 'text/csv', |
|
207 | 220 | '.cu': 'application/cu-seeme', |
|
208 | 221 | '.cuh': 'text/x-cuda', |
|
209 | 222 | '.curl': 'text/vnd.curl', |
|
210 | 223 | '.cww': 'application/prs.cww', |
|
211 | 224 | '.cxt': 'application/x-director', |
|
212 | 225 | '.cxx': 'text/x-c', |
|
213 | 226 | '.cxx-objdump': 'text/x-cpp-objdump', |
|
214 | 227 | '.d': 'text/x-dsrc', |
|
215 | 228 | '.d-objdump': 'text/x-d-objdump', |
|
216 | 229 | '.dae': 'model/vnd.collada+xml', |
|
217 | 230 | '.daf': 'application/vnd.mobius.daf', |
|
218 | 231 | '.dart': 'text/x-dart', |
|
219 | 232 | '.dataless': 'application/vnd.fdsn.seed', |
|
220 | 233 | '.davmount': 'application/davmount+xml', |
|
221 | 234 | '.dcr': 'application/x-director', |
|
222 | 235 | '.dcurl': 'text/vnd.curl.dcurl', |
|
223 | 236 | '.dd2': 'application/vnd.oma.dd2+xml', |
|
224 | 237 | '.ddd': 'application/vnd.fujixerox.ddd', |
|
225 | 238 | '.deb': 'application/x-debian-package', |
|
226 | 239 | '.def': 'text/plain', |
|
227 | 240 | '.deploy': 'application/octet-stream', |
|
228 | 241 | '.der': 'application/x-x509-ca-cert', |
|
229 | 242 | '.dfac': 'application/vnd.dreamfactory', |
|
230 | 243 | '.dg': 'text/x-dg', |
|
231 | 244 | '.di': 'text/x-dsrc', |
|
232 | 245 | '.dic': 'text/x-c', |
|
233 | 246 | '.dif': 'video/x-dv', |
|
234 | 247 | '.diff': 'text/x-diff', |
|
235 | 248 | '.dir': 'application/x-director', |
|
236 | 249 | '.dis': 'application/vnd.mobius.dis', |
|
237 | 250 | '.dist': 'application/octet-stream', |
|
238 | 251 | '.distz': 'application/octet-stream', |
|
239 | 252 | '.djv': 'image/vnd.djvu', |
|
240 | 253 | '.djvu': 'image/vnd.djvu', |
|
241 | 254 | '.dll': 'application/x-msdownload', |
|
242 | 255 | '.dmg': 'application/octet-stream', |
|
243 | 256 | '.dms': 'application/octet-stream', |
|
244 | 257 | '.dna': 'application/vnd.dna', |
|
245 | 258 | '.doc': 'application/msword', |
|
246 | 259 | '.docm': 'application/vnd.ms-word.document.macroenabled.12', |
|
247 | 260 | '.docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', |
|
248 | 261 | '.dot': 'application/msword', |
|
249 | 262 | '.dotm': 'application/vnd.ms-word.template.macroenabled.12', |
|
250 | 263 | '.dotx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', |
|
251 | 264 | '.dp': 'application/vnd.osgi.dp', |
|
252 | 265 | '.dpg': 'application/vnd.dpgraph', |
|
253 | 266 | '.dra': 'audio/vnd.dra', |
|
254 | 267 | '.dsc': 'text/prs.lines.tag', |
|
255 | 268 | '.dssc': 'application/dssc+der', |
|
256 | 269 | '.dtb': 'application/x-dtbook+xml', |
|
257 | 270 | '.dtd': 'application/xml-dtd', |
|
258 | 271 | '.dts': 'audio/vnd.dts', |
|
259 | 272 | '.dtshd': 'audio/vnd.dts.hd', |
|
260 | 273 | '.duby': 'text/x-ruby', |
|
261 | 274 | '.duel': 'text/x-duel', |
|
262 | 275 | '.dump': 'application/octet-stream', |
|
263 | 276 | '.dv': 'video/x-dv', |
|
264 | 277 | '.dvi': 'application/x-dvi', |
|
265 | 278 | '.dwf': 'model/vnd.dwf', |
|
266 | 279 | '.dwg': 'image/vnd.dwg', |
|
267 | 280 | '.dxf': 'image/vnd.dxf', |
|
268 | 281 | '.dxp': 'application/vnd.spotfire.dxp', |
|
269 | 282 | '.dxr': 'application/x-director', |
|
270 | 283 | '.dyl': 'text/x-dylan', |
|
271 | 284 | '.dylan': 'text/x-dylan', |
|
272 | 285 | '.dylan-console': 'text/x-dylan-console', |
|
273 | 286 | '.ebuild': 'text/x-sh', |
|
274 | 287 | '.ec': 'text/x-echdr', |
|
275 | 288 | '.ecelp4800': 'audio/vnd.nuera.ecelp4800', |
|
276 | 289 | '.ecelp7470': 'audio/vnd.nuera.ecelp7470', |
|
277 | 290 | '.ecelp9600': 'audio/vnd.nuera.ecelp9600', |
|
278 | 291 | '.ecl': 'text/x-ecl', |
|
279 | 292 | '.eclass': 'text/x-sh', |
|
280 | 293 | '.ecma': 'application/ecmascript', |
|
281 | 294 | '.edm': 'application/vnd.novadigm.edm', |
|
282 | 295 | '.edx': 'application/vnd.novadigm.edx', |
|
283 | 296 | '.efif': 'application/vnd.picsel', |
|
284 | 297 | '.eh': 'text/x-echdr', |
|
285 | 298 | '.ei6': 'application/vnd.pg.osasli', |
|
286 | 299 | '.el': 'text/x-common-lisp', |
|
287 | 300 | '.elc': 'application/octet-stream', |
|
288 | 301 | '.eml': 'message/rfc822', |
|
289 | 302 | '.emma': 'application/emma+xml', |
|
290 | 303 | '.eol': 'audio/vnd.digital-winds', |
|
291 | 304 | '.eot': 'application/vnd.ms-fontobject', |
|
292 | 305 | '.eps': 'application/postscript', |
|
293 | 306 | '.epub': 'application/epub+zip', |
|
294 | 307 | '.erl': 'text/x-erlang', |
|
295 | 308 | '.erl-sh': 'text/x-erl-shellsession', |
|
296 | 309 | '.es': 'text/x-erlang', |
|
297 | 310 | '.es3': 'application/vnd.eszigno3+xml', |
|
298 | 311 | '.escript': 'text/x-erlang', |
|
299 | 312 | '.esf': 'application/vnd.epson.esf', |
|
300 | 313 | '.et3': 'application/vnd.eszigno3+xml', |
|
301 | 314 | '.etx': 'text/x-setext', |
|
302 | 315 | '.evoque': 'application/x-evoque', |
|
303 | 316 | '.ex': 'text/x-elixir', |
|
304 | 317 | '.exe': 'application/x-msdownload', |
|
305 | 318 | '.exi': 'application/exi', |
|
306 | 319 | '.exs': 'text/x-elixir', |
|
307 | 320 | '.ext': 'application/vnd.novadigm.ext', |
|
308 | 321 | '.ez': 'application/andrew-inset', |
|
309 | 322 | '.ez2': 'application/vnd.ezpix-album', |
|
310 | 323 | '.ez3': 'application/vnd.ezpix-package', |
|
311 | 324 | '.f': 'text/x-fortran', |
|
312 | 325 | '.f4v': 'video/x-f4v', |
|
313 | 326 | '.f77': 'text/x-fortran', |
|
314 | 327 | '.f90': 'text/x-fortran', |
|
315 | 328 | '.factor': 'text/x-factor', |
|
316 | 329 | '.fan': 'application/x-fantom', |
|
317 | 330 | '.fancypack': 'text/x-fancysrc', |
|
318 | 331 | '.fbs': 'image/vnd.fastbidsheet', |
|
319 | 332 | '.fcs': 'application/vnd.isac.fcs', |
|
320 | 333 | '.fdf': 'application/vnd.fdf', |
|
321 | 334 | '.fe_launch': 'application/vnd.denovo.fcselayout-link', |
|
322 | 335 | '.feature': 'text/x-gherkin', |
|
323 | 336 | '.fg5': 'application/vnd.fujitsu.oasysgp', |
|
324 | 337 | '.fgd': 'application/x-director', |
|
325 | 338 | '.fh': 'image/x-freehand', |
|
326 | 339 | '.fh4': 'image/x-freehand', |
|
327 | 340 | '.fh5': 'image/x-freehand', |
|
328 | 341 | '.fh7': 'image/x-freehand', |
|
329 | 342 | '.fhc': 'image/x-freehand', |
|
330 | 343 | '.fig': 'application/x-xfig', |
|
331 | 344 | '.fli': 'video/x-fli', |
|
332 | 345 | '.flo': 'application/vnd.micrografx.flo', |
|
333 | 346 | '.flv': 'video/x-flv', |
|
334 | 347 | '.flw': 'application/vnd.kde.kivio', |
|
335 | 348 | '.flx': 'text/vnd.fmi.flexstor', |
|
336 | 349 | '.flxh': 'text/x-felix', |
|
337 | 350 | '.fly': 'text/vnd.fly', |
|
338 | 351 | '.fm': 'application/vnd.framemaker', |
|
339 | 352 | '.fnc': 'application/vnd.frogans.fnc', |
|
340 | 353 | '.for': 'text/x-fortran', |
|
341 | 354 | '.fpx': 'image/vnd.fpx', |
|
342 | 355 | '.frag': 'text/x-glslsrc', |
|
343 | 356 | '.frame': 'application/vnd.framemaker', |
|
344 | 357 | '.fs': 'text/x-fsharp', |
|
345 | 358 | '.fsc': 'application/vnd.fsc.weblaunch', |
|
346 | 359 | '.fsi': 'text/x-fsharp', |
|
347 | 360 | '.fst': 'image/vnd.fst', |
|
348 | 361 | '.ftc': 'application/vnd.fluxtime.clip', |
|
349 | 362 | '.fti': 'application/vnd.anser-web-funds-transfer-initiation', |
|
350 | 363 | '.fun': 'text/x-standardml', |
|
351 | 364 | '.fvt': 'video/vnd.fvt', |
|
352 | 365 | '.fxp': 'application/vnd.adobe.fxp', |
|
353 | 366 | '.fxpl': 'application/vnd.adobe.fxp', |
|
354 | 367 | '.fy': 'text/x-fancysrc', |
|
355 | 368 | '.fzs': 'application/vnd.fuzzysheet', |
|
356 | 369 | '.g2w': 'application/vnd.geoplan', |
|
357 | 370 | '.g3': 'image/g3fax', |
|
358 | 371 | '.g3w': 'application/vnd.geospace', |
|
359 | 372 | '.gac': 'application/vnd.groove-account', |
|
360 | 373 | '.gdc': 'text/x-gooddata-cl', |
|
361 | 374 | '.gdl': 'model/vnd.gdl', |
|
362 | 375 | '.gemspec': 'text/x-ruby', |
|
363 | 376 | '.geo': 'application/vnd.dynageo', |
|
364 | 377 | '.gex': 'application/vnd.geometry-explorer', |
|
365 | 378 | '.ggb': 'application/vnd.geogebra.file', |
|
366 | 379 | '.ggt': 'application/vnd.geogebra.tool', |
|
367 | 380 | '.ghf': 'application/vnd.groove-help', |
|
368 | 381 | '.gif': 'image/gif', |
|
369 | 382 | '.gim': 'application/vnd.groove-identity-message', |
|
370 | 383 | '.gmx': 'application/vnd.gmx', |
|
371 | 384 | '.gnumeric': 'application/x-gnumeric', |
|
372 | 385 | '.go': 'text/x-gosrc', |
|
373 | 386 | '.gph': 'application/vnd.flographit', |
|
374 | 387 | '.gqf': 'application/vnd.grafeq', |
|
375 | 388 | '.gqs': 'application/vnd.grafeq', |
|
376 | 389 | '.gram': 'application/srgs', |
|
377 | 390 | '.gre': 'application/vnd.geometry-explorer', |
|
378 | 391 | '.groovy': 'text/x-groovy', |
|
379 | 392 | '.grv': 'application/vnd.groove-injector', |
|
380 | 393 | '.grxml': 'application/srgs+xml', |
|
381 | 394 | '.gs': 'text/x-gosu', |
|
382 | 395 | '.gsf': 'application/x-font-ghostscript', |
|
383 | 396 | '.gsp': 'text/x-gosu', |
|
384 | 397 | '.gst': 'text/x-gosu-template', |
|
385 | 398 | '.gsx': 'text/x-gosu', |
|
386 | 399 | '.gtar': 'application/x-gtar', |
|
387 | 400 | '.gtm': 'application/vnd.groove-tool-message', |
|
388 | 401 | '.gtw': 'model/vnd.gtw', |
|
389 | 402 | '.gv': 'text/vnd.graphviz', |
|
390 | 403 | '.gxt': 'application/vnd.geonext', |
|
391 | 404 | '.h': 'text/x-c', |
|
392 | 405 | '.h++': 'text/x-c++hdr', |
|
393 | 406 | '.h261': 'video/h261', |
|
394 | 407 | '.h263': 'video/h263', |
|
395 | 408 | '.h264': 'video/h264', |
|
396 | 409 | '.hal': 'application/vnd.hal+xml', |
|
397 | 410 | '.haml': 'text/x-haml', |
|
398 | 411 | '.hbci': 'application/vnd.hbci', |
|
399 | 412 | '.hdf': 'application/x-hdf', |
|
400 | 413 | '.hdp': 'text/x-dylan-lid', |
|
401 | 414 | '.hh': 'text/x-c', |
|
402 | 415 | '.hlp': 'application/winhlp', |
|
403 | 416 | '.hpgl': 'application/vnd.hp-hpgl', |
|
404 | 417 | '.hpid': 'application/vnd.hp-hpid', |
|
405 | 418 | '.hpp': 'text/x-c++hdr', |
|
406 | 419 | '.hps': 'application/vnd.hp-hps', |
|
407 | 420 | '.hqx': 'application/mac-binhex40', |
|
408 | 421 | '.hrl': 'text/x-erlang', |
|
409 | 422 | '.hs': 'text/x-haskell', |
|
410 | 423 | '.htke': 'application/vnd.kenameaapp', |
|
411 | 424 | '.htm': 'text/html', |
|
412 | 425 | '.html': 'text/html', |
|
413 | 426 | '.hvd': 'application/vnd.yamaha.hv-dic', |
|
414 | 427 | '.hvp': 'application/vnd.yamaha.hv-voice', |
|
415 | 428 | '.hvs': 'application/vnd.yamaha.hv-script', |
|
416 | 429 | '.hx': 'text/haxe', |
|
417 | 430 | '.hxx': 'text/x-c++hdr', |
|
418 | 431 | '.hy': 'text/x-hybris', |
|
419 | 432 | '.hyb': 'text/x-hybris', |
|
420 | 433 | '.i2g': 'application/vnd.intergeo', |
|
421 | 434 | '.icc': 'application/vnd.iccprofile', |
|
422 | 435 | '.ice': 'x-conference/x-cooltalk', |
|
423 | 436 | '.icm': 'application/vnd.iccprofile', |
|
424 | 437 | '.ico': 'image/x-icon', |
|
425 | 438 | '.ics': 'text/calendar', |
|
426 | 439 | '.idc': 'text/x-chdr', |
|
427 | 440 | '.ief': 'image/ief', |
|
428 | 441 | '.ifb': 'text/calendar', |
|
429 | 442 | '.ifm': 'application/vnd.shana.informed.formdata', |
|
430 | 443 | '.iges': 'model/iges', |
|
431 | 444 | '.igl': 'application/vnd.igloader', |
|
432 | 445 | '.igm': 'application/vnd.insors.igm', |
|
433 | 446 | '.igs': 'model/iges', |
|
434 | 447 | '.igx': 'application/vnd.micrografx.igx', |
|
435 | 448 | '.iif': 'application/vnd.shana.informed.interchange', |
|
436 | 449 | '.ik': 'text/x-iokesrc', |
|
437 | 450 | '.imp': 'application/vnd.accpac.simply.imp', |
|
438 | 451 | '.ims': 'application/vnd.ms-ims', |
|
439 | 452 | '.in': 'text/plain', |
|
440 | 453 | '.inc': 'text/x-povray', |
|
441 | 454 | '.ini': 'text/x-ini', |
|
442 | 455 | '.intr': 'text/x-dylan', |
|
443 | 456 | '.io': 'text/x-iosrc', |
|
444 | 457 | '.ipfix': 'application/ipfix', |
|
445 | 458 | '.ipk': 'application/vnd.shana.informed.package', |
|
446 | 459 | '.irm': 'application/vnd.ibm.rights-management', |
|
447 | 460 | '.irp': 'application/vnd.irepository.package+xml', |
|
448 | 461 | '.iso': 'application/octet-stream', |
|
449 | 462 | '.itp': 'application/vnd.shana.informed.formtemplate', |
|
450 | 463 | '.ivp': 'application/vnd.immervision-ivp', |
|
451 | 464 | '.ivu': 'application/vnd.immervision-ivu', |
|
452 | 465 | '.j': 'text/x-objective-j', |
|
453 | 466 | '.jad': 'text/vnd.sun.j2me.app-descriptor', |
|
454 | 467 | '.jade': 'text/x-jade', |
|
455 | 468 | '.jam': 'application/vnd.jam', |
|
456 | 469 | '.jar': 'application/java-archive', |
|
457 | 470 | '.java': 'text/x-java-source', |
|
458 | 471 | '.jbst': 'text/x-duel', |
|
459 | 472 | '.jisp': 'application/vnd.jisp', |
|
460 | 473 | '.jl': 'text/x-julia', |
|
461 | 474 | '.jlt': 'application/vnd.hp-jlyt', |
|
462 | 475 | '.jnlp': 'application/x-java-jnlp-file', |
|
463 | 476 | '.joda': 'application/vnd.joost.joda-archive', |
|
464 | 477 | '.jp2': 'image/jp2', |
|
465 | 478 | '.jpe': 'image/jpeg', |
|
466 | 479 | '.jpeg': 'image/jpeg', |
|
467 | 480 | '.jpg': 'image/jpeg', |
|
468 | 481 | '.jpgm': 'video/jpm', |
|
469 | 482 | '.jpgv': 'video/jpeg', |
|
470 | 483 | '.jpm': 'video/jpm', |
|
471 | 484 | '.js': 'application/javascript', |
|
472 | 485 | '.json': 'application/json', |
|
473 | 486 | '.jsp': 'application/x-jsp', |
|
474 | 487 | '.kar': 'audio/midi', |
|
475 | 488 | '.karbon': 'application/vnd.kde.karbon', |
|
476 | 489 | '.kfo': 'application/vnd.kde.kformula', |
|
477 | 490 | '.kia': 'application/vnd.kidspiration', |
|
478 | 491 | '.kid': 'application/x-genshi', |
|
479 | 492 | '.kk': 'text/x-koka', |
|
480 | 493 | '.kki': 'text/x-koka', |
|
481 | 494 | '.kml': 'application/vnd.google-earth.kml+xml', |
|
482 | 495 | '.kmz': 'application/vnd.google-earth.kmz', |
|
483 | 496 | '.kne': 'application/vnd.kinar', |
|
484 | 497 | '.knp': 'application/vnd.kinar', |
|
485 | 498 | '.kon': 'application/vnd.kde.kontour', |
|
486 | 499 | '.kpr': 'application/vnd.kde.kpresenter', |
|
487 | 500 | '.kpt': 'application/vnd.kde.kpresenter', |
|
488 | 501 | '.ksh': 'text/plain', |
|
489 | 502 | '.ksp': 'application/vnd.kde.kspread', |
|
490 | 503 | '.kt': 'text/x-kotlin', |
|
491 | 504 | '.ktr': 'application/vnd.kahootz', |
|
492 | 505 | '.ktx': 'image/ktx', |
|
493 | 506 | '.ktz': 'application/vnd.kahootz', |
|
494 | 507 | '.kwd': 'application/vnd.kde.kword', |
|
495 | 508 | '.kwt': 'application/vnd.kde.kword', |
|
496 | 509 | '.lasso': 'text/x-lasso', |
|
497 | 510 | '.lasso[89]': 'text/x-lasso', |
|
498 | 511 | '.lasxml': 'application/vnd.las.las+xml', |
|
499 | 512 | '.latex': 'application/x-latex', |
|
500 | 513 | '.lbd': 'application/vnd.llamagraphics.life-balance.desktop', |
|
501 | 514 | '.lbe': 'application/vnd.llamagraphics.life-balance.exchange+xml', |
|
502 | 515 | '.les': 'application/vnd.hhe.lesson-player', |
|
503 | 516 | '.less': 'text/x-less', |
|
504 | 517 | '.lgt': 'text/x-logtalk', |
|
505 | 518 | '.lha': 'application/octet-stream', |
|
506 | 519 | '.lhs': 'text/x-literate-haskell', |
|
507 | 520 | '.lid': 'text/x-dylan-lid', |
|
508 | 521 | '.link66': 'application/vnd.route66.link66+xml', |
|
509 | 522 | '.lisp': 'text/x-common-lisp', |
|
510 | 523 | '.list': 'text/plain', |
|
511 | 524 | '.list3820': 'application/vnd.ibm.modcap', |
|
512 | 525 | '.listafp': 'application/vnd.ibm.modcap', |
|
513 | 526 | '.ll': 'text/x-llvm', |
|
514 | 527 | '.log': 'text/plain', |
|
515 | 528 | '.lostxml': 'application/lost+xml', |
|
516 | 529 | '.lrf': 'application/octet-stream', |
|
517 | 530 | '.lrm': 'application/vnd.ms-lrm', |
|
518 | 531 | '.ls': 'text/x-livescript', |
|
519 | 532 | '.lsp': 'text/x-newlisp', |
|
520 | 533 | '.ltf': 'application/vnd.frogans.ltf', |
|
521 | 534 | '.ltx': 'text/x-latex', |
|
522 | 535 | '.lua': 'text/x-lua', |
|
523 | 536 | '.lvp': 'audio/vnd.lucent.voice', |
|
524 | 537 | '.lwp': 'application/vnd.lotus-wordpro', |
|
525 | 538 | '.lzh': 'application/octet-stream', |
|
526 | 539 | '.m': 'text/octave', |
|
527 | 540 | '.m13': 'application/x-msmediaview', |
|
528 | 541 | '.m14': 'application/x-msmediaview', |
|
529 | 542 | '.m1v': 'video/mpeg', |
|
530 | 543 | '.m21': 'application/mp21', |
|
531 | 544 | '.m2a': 'audio/mpeg', |
|
532 | 545 | '.m2v': 'video/mpeg', |
|
533 | 546 | '.m3a': 'audio/mpeg', |
|
534 | 547 | '.m3u': 'audio/x-mpegurl', |
|
535 | 548 | '.m3u8': 'application/x-mpegurl', |
|
536 | 549 | '.m4a': 'audio/mp4a-latm', |
|
537 | 550 | '.m4p': 'audio/mp4a-latm', |
|
538 | 551 | '.m4u': 'video/vnd.mpegurl', |
|
539 | 552 | '.m4v': 'video/x-m4v', |
|
540 | 553 | '.ma': 'application/mathematica', |
|
541 | 554 | '.mac': 'image/x-macpaint', |
|
542 | 555 | '.mads': 'application/mads+xml', |
|
543 | 556 | '.mag': 'application/vnd.ecowin.chart', |
|
544 | 557 | '.mak': 'text/x-makefile', |
|
545 | 558 | '.maker': 'application/vnd.framemaker', |
|
546 | 559 | '.mako': 'application/x-mako', |
|
547 | 560 | '.man': 'text/troff', |
|
548 | 561 | '.manifest': 'text/cache-manifest', |
|
549 | 562 | '.maql': 'text/x-gooddata-maql', |
|
550 | 563 | '.markdown': 'text/x-markdown', |
|
551 | 564 | '.mathml': 'application/mathml+xml', |
|
552 | 565 | '.mb': 'application/mathematica', |
|
553 | 566 | '.mbk': 'application/vnd.mobius.mbk', |
|
554 | 567 | '.mbox': 'application/mbox', |
|
555 | 568 | '.mc': 'application/x-mason', |
|
556 | 569 | '.mc1': 'application/vnd.medcalcdata', |
|
557 | 570 | '.mcd': 'application/vnd.mcd', |
|
558 | 571 | '.mcurl': 'text/vnd.curl.mcurl', |
|
559 | 572 | '.md': 'text/x-minidsrc', |
|
560 | 573 | '.mdb': 'application/x-msaccess', |
|
561 | 574 | '.mdi': 'image/vnd.ms-modi', |
|
562 | 575 | '.mdown': 'text/x-markdown', |
|
563 | 576 | '.me': 'text/troff', |
|
564 | 577 | '.mesh': 'model/mesh', |
|
565 | 578 | '.meta4': 'application/metalink4+xml', |
|
566 | 579 | '.mets': 'application/mets+xml', |
|
567 | 580 | '.mfm': 'application/vnd.mfmp', |
|
568 | 581 | '.mgp': 'application/vnd.osgeo.mapguide.package', |
|
569 | 582 | '.mgz': 'application/vnd.proteus.magazine', |
|
570 | 583 | '.mht': 'message/rfc822', |
|
571 | 584 | '.mhtml': 'message/rfc822', |
|
572 | 585 | '.mi': 'application/x-mason', |
|
573 | 586 | '.mid': 'audio/midi', |
|
574 | 587 | '.midi': 'audio/midi', |
|
575 | 588 | '.mif': 'application/vnd.mif', |
|
576 | 589 | '.mime': 'message/rfc822', |
|
577 | 590 | '.mj2': 'video/mj2', |
|
578 | 591 | '.mjp2': 'video/mj2', |
|
579 | 592 | '.ml': 'text/x-ocaml', |
|
580 | 593 | '.mli': 'text/x-ocaml', |
|
581 | 594 | '.mll': 'text/x-ocaml', |
|
582 | 595 | '.mlp': 'application/vnd.dolby.mlp', |
|
583 | 596 | '.mly': 'text/x-ocaml', |
|
584 | 597 | '.mm': 'text/x-objective-c++', |
|
585 | 598 | '.mmd': 'application/vnd.chipnuts.karaoke-mmd', |
|
586 | 599 | '.mmf': 'application/vnd.smaf', |
|
587 | 600 | '.mmr': 'image/vnd.fujixerox.edmics-mmr', |
|
588 | 601 | '.mny': 'application/x-msmoney', |
|
589 | 602 | '.mo': 'text/x-modelica', |
|
590 | 603 | '.mobi': 'application/x-mobipocket-ebook', |
|
591 | 604 | '.mobipocket-ebook': 'application/octet-stream', |
|
592 | 605 | '.mod': 'text/x-modula2', |
|
593 | 606 | '.mods': 'application/mods+xml', |
|
594 | 607 | '.monkey': 'text/x-monkey', |
|
595 | 608 | '.moo': 'text/x-moocode', |
|
596 | 609 | '.moon': 'text/x-moonscript', |
|
597 | 610 | '.mov': 'video/quicktime', |
|
598 | 611 | '.movie': 'video/x-sgi-movie', |
|
599 | 612 | '.mp2': 'audio/mpeg', |
|
600 | 613 | '.mp21': 'application/mp21', |
|
601 | 614 | '.mp2a': 'audio/mpeg', |
|
602 | 615 | '.mp3': 'audio/mpeg', |
|
603 | 616 | '.mp4': 'video/mp4', |
|
604 | 617 | '.mp4a': 'audio/mp4', |
|
605 | 618 | '.mp4s': 'application/mp4', |
|
606 | 619 | '.mp4v': 'video/mp4', |
|
607 | 620 | '.mpa': 'video/mpeg', |
|
608 | 621 | '.mpc': 'application/vnd.mophun.certificate', |
|
609 | 622 | '.mpe': 'video/mpeg', |
|
610 | 623 | '.mpeg': 'video/mpeg', |
|
611 | 624 | '.mpg': 'video/mpeg', |
|
612 | 625 | '.mpg4': 'video/mp4', |
|
613 | 626 | '.mpga': 'audio/mpeg', |
|
614 | 627 | '.mpkg': 'application/vnd.apple.installer+xml', |
|
615 | 628 | '.mpm': 'application/vnd.blueice.multipass', |
|
616 | 629 | '.mpn': 'application/vnd.mophun.application', |
|
617 | 630 | '.mpp': 'application/vnd.ms-project', |
|
618 | 631 | '.mpt': 'application/vnd.ms-project', |
|
619 | 632 | '.mpy': 'application/vnd.ibm.minipay', |
|
620 | 633 | '.mqy': 'application/vnd.mobius.mqy', |
|
621 | 634 | '.mrc': 'application/marc', |
|
622 | 635 | '.mrcx': 'application/marcxml+xml', |
|
623 | 636 | '.ms': 'text/troff', |
|
624 | 637 | '.mscml': 'application/mediaservercontrol+xml', |
|
625 | 638 | '.mseed': 'application/vnd.fdsn.mseed', |
|
626 | 639 | '.mseq': 'application/vnd.mseq', |
|
627 | 640 | '.msf': 'application/vnd.epson.msf', |
|
628 | 641 | '.msh': 'model/mesh', |
|
629 | 642 | '.msi': 'application/x-msdownload', |
|
630 | 643 | '.msl': 'application/vnd.mobius.msl', |
|
631 | 644 | '.msty': 'application/vnd.muvee.style', |
|
632 | 645 | '.mts': 'model/vnd.mts', |
|
633 | 646 | '.mus': 'application/vnd.musician', |
|
634 | 647 | '.musicxml': 'application/vnd.recordare.musicxml+xml', |
|
635 | 648 | '.mvb': 'application/x-msmediaview', |
|
636 | 649 | '.mwf': 'application/vnd.mfer', |
|
637 | 650 | '.mxf': 'application/mxf', |
|
638 | 651 | '.mxl': 'application/vnd.recordare.musicxml', |
|
639 | 652 | '.mxml': 'application/xv+xml', |
|
640 | 653 | '.mxs': 'application/vnd.triscape.mxs', |
|
641 | 654 | '.mxu': 'video/vnd.mpegurl', |
|
642 | 655 | '.myt': 'application/x-myghty', |
|
643 | 656 | '.n': 'text/x-nemerle', |
|
644 | 657 | '.n-gage': 'application/vnd.nokia.n-gage.symbian.install', |
|
645 | 658 | '.n3': 'text/n3', |
|
646 | 659 | '.nb': 'application/mathematica', |
|
647 | 660 | '.nbp': 'application/vnd.wolfram.player', |
|
648 | 661 | '.nc': 'application/x-netcdf', |
|
649 | 662 | '.ncx': 'application/x-dtbncx+xml', |
|
650 | 663 | '.ngdat': 'application/vnd.nokia.n-gage.data', |
|
651 | 664 | '.nim': 'text/x-nimrod', |
|
652 | 665 | '.nimrod': 'text/x-nimrod', |
|
653 | 666 | '.nl': 'text/x-newlisp', |
|
654 | 667 | '.nlu': 'application/vnd.neurolanguage.nlu', |
|
655 | 668 | '.nml': 'application/vnd.enliven', |
|
656 | 669 | '.nnd': 'application/vnd.noblenet-directory', |
|
657 | 670 | '.nns': 'application/vnd.noblenet-sealer', |
|
658 | 671 | '.nnw': 'application/vnd.noblenet-web', |
|
659 | 672 | '.npx': 'image/vnd.net-fpx', |
|
660 | 673 | '.ns2': 'text/x-newspeak', |
|
661 | 674 | '.nsf': 'application/vnd.lotus-notes', |
|
662 | 675 | '.nsh': 'text/x-nsis', |
|
663 | 676 | '.nsi': 'text/x-nsis', |
|
664 | 677 | '.nws': 'message/rfc822', |
|
665 | 678 | '.o': 'application/octet-stream', |
|
666 | 679 | '.oa2': 'application/vnd.fujitsu.oasys2', |
|
667 | 680 | '.oa3': 'application/vnd.fujitsu.oasys3', |
|
668 | 681 | '.oas': 'application/vnd.fujitsu.oasys', |
|
669 | 682 | '.obd': 'application/x-msbinder', |
|
670 | 683 | '.obj': 'application/octet-stream', |
|
671 | 684 | '.objdump': 'text/x-objdump', |
|
672 | 685 | '.oda': 'application/oda', |
|
673 | 686 | '.odb': 'application/vnd.oasis.opendocument.database', |
|
674 | 687 | '.odc': 'application/vnd.oasis.opendocument.chart', |
|
675 | 688 | '.odf': 'application/vnd.oasis.opendocument.formula', |
|
676 | 689 | '.odft': 'application/vnd.oasis.opendocument.formula-template', |
|
677 | 690 | '.odg': 'application/vnd.oasis.opendocument.graphics', |
|
678 | 691 | '.odi': 'application/vnd.oasis.opendocument.image', |
|
679 | 692 | '.odm': 'application/vnd.oasis.opendocument.text-master', |
|
680 | 693 | '.odp': 'application/vnd.oasis.opendocument.presentation', |
|
681 | 694 | '.ods': 'application/vnd.oasis.opendocument.spreadsheet', |
|
682 | 695 | '.odt': 'application/vnd.oasis.opendocument.text', |
|
683 | 696 | '.oga': 'audio/ogg', |
|
684 | 697 | '.ogg': 'audio/ogg', |
|
685 | 698 | '.ogv': 'video/ogg', |
|
686 | 699 | '.ogx': 'application/ogg', |
|
687 | 700 | '.onepkg': 'application/onenote', |
|
688 | 701 | '.onetmp': 'application/onenote', |
|
689 | 702 | '.onetoc': 'application/onenote', |
|
690 | 703 | '.onetoc2': 'application/onenote', |
|
691 | 704 | '.ooc': 'text/x-ooc', |
|
692 | 705 | '.opa': 'text/x-opa', |
|
693 | 706 | '.opf': 'application/oebps-package+xml', |
|
694 | 707 | '.oprc': 'application/vnd.palm', |
|
695 | 708 | '.org': 'application/vnd.lotus-organizer', |
|
696 | 709 | '.osf': 'application/vnd.yamaha.openscoreformat', |
|
697 | 710 | '.osfpvg': 'application/vnd.yamaha.openscoreformat.osfpvg+xml', |
|
698 | 711 | '.otc': 'application/vnd.oasis.opendocument.chart-template', |
|
699 | 712 | '.otf': 'application/x-font-otf', |
|
700 | 713 | '.otg': 'application/vnd.oasis.opendocument.graphics-template', |
|
701 | 714 | '.oth': 'application/vnd.oasis.opendocument.text-web', |
|
702 | 715 | '.oti': 'application/vnd.oasis.opendocument.image-template', |
|
703 | 716 | '.otp': 'application/vnd.oasis.opendocument.presentation-template', |
|
704 | 717 | '.ots': 'application/vnd.oasis.opendocument.spreadsheet-template', |
|
705 | 718 | '.ott': 'application/vnd.oasis.opendocument.text-template', |
|
706 | 719 | '.oxt': 'application/vnd.openofficeorg.extension', |
|
707 | 720 | '.p': 'text/x-pascal', |
|
708 | 721 | '.p10': 'application/pkcs10', |
|
709 | 722 | '.p12': 'application/x-pkcs12', |
|
710 | 723 | '.p7b': 'application/x-pkcs7-certificates', |
|
711 | 724 | '.p7c': 'application/pkcs7-mime', |
|
712 | 725 | '.p7m': 'application/pkcs7-mime', |
|
713 | 726 | '.p7r': 'application/x-pkcs7-certreqresp', |
|
714 | 727 | '.p7s': 'application/pkcs7-signature', |
|
715 | 728 | '.p8': 'application/pkcs8', |
|
716 | 729 | '.pas': 'text/x-pascal', |
|
717 | 730 | '.patch': 'text/x-diff', |
|
718 | 731 | '.paw': 'application/vnd.pawaafile', |
|
719 | 732 | '.pbd': 'application/vnd.powerbuilder6', |
|
720 | 733 | '.pbm': 'image/x-portable-bitmap', |
|
721 | 734 | '.pcf': 'application/x-font-pcf', |
|
722 | 735 | '.pcl': 'application/vnd.hp-pcl', |
|
723 | 736 | '.pclxl': 'application/vnd.hp-pclxl', |
|
724 | 737 | '.pct': 'image/x-pict', |
|
725 | 738 | '.pcurl': 'application/vnd.curl.pcurl', |
|
726 | 739 | '.pcx': 'image/x-pcx', |
|
727 | 740 | '.pdb': 'application/vnd.palm', |
|
728 | 741 | '.pdf': 'application/pdf', |
|
729 | 742 | '.pfa': 'application/x-font-type1', |
|
730 | 743 | '.pfb': 'application/x-font-type1', |
|
731 | 744 | '.pfm': 'application/x-font-type1', |
|
732 | 745 | '.pfr': 'application/font-tdpfr', |
|
733 | 746 | '.pfx': 'application/x-pkcs12', |
|
734 | 747 | '.pgm': 'image/x-portable-graymap', |
|
735 | 748 | '.pgn': 'application/x-chess-pgn', |
|
736 | 749 | '.pgp': 'application/pgp-encrypted', |
|
737 | 750 | '.php': 'text/x-php', |
|
738 | 751 | '.php[345]': 'text/x-php', |
|
739 | 752 | '.phtml': 'application/x-php', |
|
740 | 753 | '.pic': 'image/x-pict', |
|
741 | 754 | '.pict': 'image/pict', |
|
742 | 755 | '.pkg': 'application/octet-stream', |
|
743 | 756 | '.pki': 'application/pkixcmp', |
|
744 | 757 | '.pkipath': 'application/pkix-pkipath', |
|
745 | 758 | '.pl': 'text/plain', |
|
746 | 759 | '.plb': 'application/vnd.3gpp.pic-bw-large', |
|
747 | 760 | '.plc': 'application/vnd.mobius.plc', |
|
748 | 761 | '.plf': 'application/vnd.pocketlearn', |
|
749 | 762 | '.plot': 'text/x-gnuplot', |
|
750 | 763 | '.pls': 'application/pls+xml', |
|
751 | 764 | '.plt': 'text/x-gnuplot', |
|
752 | 765 | '.pm': 'text/x-perl', |
|
753 | 766 | '.pml': 'application/vnd.ctc-posml', |
|
754 | 767 | '.png': 'image/png', |
|
755 | 768 | '.pnm': 'image/x-portable-anymap', |
|
756 | 769 | '.pnt': 'image/x-macpaint', |
|
757 | 770 | '.pntg': 'image/x-macpaint', |
|
758 | 771 | '.po': 'application/x-gettext', |
|
759 | 772 | '.portpkg': 'application/vnd.macports.portpkg', |
|
760 | 773 | '.pot': 'application/vnd.ms-powerpoint', |
|
761 | 774 | '.potm': 'application/vnd.ms-powerpoint.template.macroenabled.12', |
|
762 | 775 | '.potx': 'application/vnd.openxmlformats-officedocument.presentationml.template', |
|
763 | 776 | '.pov': 'text/x-povray', |
|
764 | 777 | '.ppa': 'application/vnd.ms-powerpoint', |
|
765 | 778 | '.ppam': 'application/vnd.ms-powerpoint.addin.macroenabled.12', |
|
766 | 779 | '.ppd': 'application/vnd.cups-ppd', |
|
767 | 780 | '.ppm': 'image/x-portable-pixmap', |
|
768 | 781 | '.pps': 'application/vnd.ms-powerpoint', |
|
769 | 782 | '.ppsm': 'application/vnd.ms-powerpoint.slideshow.macroenabled.12', |
|
770 | 783 | '.ppsx': 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', |
|
771 | 784 | '.ppt': 'application/vnd.ms-powerpoint', |
|
772 | 785 | '.pptm': 'application/vnd.ms-powerpoint.presentation.macroenabled.12', |
|
773 | 786 | '.pptx': 'application/vnd.openxmlformats-officedocument.presentationml.presentation', |
|
774 | 787 | '.pqa': 'application/vnd.palm', |
|
775 | 788 | '.prc': 'application/x-mobipocket-ebook', |
|
776 | 789 | '.pre': 'application/vnd.lotus-freelance', |
|
777 | 790 | '.prf': 'application/pics-rules', |
|
778 | 791 | '.pro': 'text/idl', |
|
779 | 792 | '.prolog': 'text/x-prolog', |
|
780 | 793 | '.properties': 'text/x-properties', |
|
781 | 794 | '.ps': 'application/postscript', |
|
782 | 795 | '.ps1': 'text/x-powershell', |
|
783 | 796 | '.psb': 'application/vnd.3gpp.pic-bw-small', |
|
784 | 797 | '.psd': 'image/vnd.adobe.photoshop', |
|
785 | 798 | '.psf': 'application/x-font-linux-psf', |
|
786 | 799 | '.pskcxml': 'application/pskc+xml', |
|
787 | 800 | '.ptid': 'application/vnd.pvi.ptid1', |
|
788 | 801 | '.pub': 'application/x-mspublisher', |
|
789 | 802 | '.pvb': 'application/vnd.3gpp.pic-bw-var', |
|
790 | 803 | '.pwn': 'application/vnd.3m.post-it-notes', |
|
791 | 804 | '.pwz': 'application/vnd.ms-powerpoint', |
|
792 | 805 | '.pxd': 'text/x-cython', |
|
793 | 806 | '.pxi': 'text/x-cython', |
|
794 | 807 | '.py': 'text/x-python', |
|
795 | 808 | '.py3tb': 'text/x-python3-traceback', |
|
796 | 809 | '.pya': 'audio/vnd.ms-playready.media.pya', |
|
797 | 810 | '.pyc': 'application/x-python-code', |
|
798 | 811 | '.pyo': 'application/x-python-code', |
|
799 | 812 | '.pypylog': 'application/x-pypylog', |
|
800 | 813 | '.pytb': 'text/x-python-traceback', |
|
801 | 814 | '.pyv': 'video/vnd.ms-playready.media.pyv', |
|
802 | 815 | '.pyw': 'text/x-python', |
|
803 | 816 | '.pyx': 'text/x-cython', |
|
804 | 817 | '.qam': 'application/vnd.epson.quickanime', |
|
805 | 818 | '.qbo': 'application/vnd.intu.qbo', |
|
806 | 819 | '.qfx': 'application/vnd.intu.qfx', |
|
807 | 820 | '.qml': 'application/x-qml', |
|
808 | 821 | '.qps': 'application/vnd.publishare-delta-tree', |
|
809 | 822 | '.qt': 'video/quicktime', |
|
810 | 823 | '.qti': 'image/x-quicktime', |
|
811 | 824 | '.qtif': 'image/x-quicktime', |
|
812 | 825 | '.qwd': 'application/vnd.quark.quarkxpress', |
|
813 | 826 | '.qwt': 'application/vnd.quark.quarkxpress', |
|
814 | 827 | '.qxb': 'application/vnd.quark.quarkxpress', |
|
815 | 828 | '.qxd': 'application/vnd.quark.quarkxpress', |
|
816 | 829 | '.qxl': 'application/vnd.quark.quarkxpress', |
|
817 | 830 | '.qxt': 'application/vnd.quark.quarkxpress', |
|
818 | 831 | '.r': 'text/x-rebol', |
|
819 | 832 | '.r3': 'text/x-rebol', |
|
820 | 833 | '.ra': 'audio/x-pn-realaudio', |
|
821 | 834 | '.rake': 'text/x-ruby', |
|
822 | 835 | '.ram': 'audio/x-pn-realaudio', |
|
823 | 836 | '.rar': 'application/x-rar-compressed', |
|
824 | 837 | '.ras': 'image/x-cmu-raster', |
|
825 | 838 | '.rb': 'text/x-ruby', |
|
826 | 839 | '.rbw': 'text/x-ruby', |
|
827 | 840 | '.rbx': 'text/x-ruby', |
|
828 | 841 | '.rc': 'text/x-stsrc', |
|
829 | 842 | '.rcprofile': 'application/vnd.ipunplugged.rcprofile', |
|
830 | 843 | '.rdf': 'application/rdf+xml', |
|
831 | 844 | '.rdz': 'application/vnd.data-vision.rdz', |
|
832 | 845 | '.reg': 'text/x-windows-registry', |
|
833 | 846 | '.rep': 'application/vnd.businessobjects', |
|
834 | 847 | '.res': 'application/x-dtbresource+xml', |
|
835 | 848 | '.rest': 'text/x-rst', |
|
836 | 849 | '.rgb': 'image/x-rgb', |
|
837 | 850 | '.rhtml': 'text/html+ruby', |
|
838 | 851 | '.rif': 'application/reginfo+xml', |
|
839 | 852 | '.rip': 'audio/vnd.rip', |
|
840 | 853 | '.rkt': 'text/x-racket', |
|
841 | 854 | '.rktl': 'text/x-racket', |
|
842 | 855 | '.rl': 'application/resource-lists+xml', |
|
843 | 856 | '.rlc': 'image/vnd.fujixerox.edmics-rlc', |
|
844 | 857 | '.rld': 'application/resource-lists-diff+xml', |
|
845 | 858 | '.rm': 'application/vnd.rn-realmedia', |
|
846 | 859 | '.rmi': 'audio/midi', |
|
847 | 860 | '.rmp': 'audio/x-pn-realaudio-plugin', |
|
848 | 861 | '.rms': 'application/vnd.jcp.javame.midlet-rms', |
|
849 | 862 | '.rnc': 'application/relax-ng-compact-syntax', |
|
850 | 863 | '.robot': 'text/x-robotframework', |
|
851 | 864 | '.roff': 'text/troff', |
|
852 | 865 | '.rp9': 'application/vnd.cloanto.rp9', |
|
853 | 866 | '.rpss': 'application/vnd.nokia.radio-presets', |
|
854 | 867 | '.rpst': 'application/vnd.nokia.radio-preset', |
|
855 | 868 | '.rq': 'application/sparql-query', |
|
856 | 869 | '.rs': 'application/rls-services+xml', |
|
857 | 870 | '.rsd': 'application/rsd+xml', |
|
858 | 871 | '.rss': 'application/rss+xml', |
|
859 | 872 | '.rst': 'text/x-rst', |
|
860 | 873 | '.rtf': 'application/rtf', |
|
861 | 874 | '.rtx': 'text/richtext', |
|
862 | 875 | '.s': 'text/x-asm', |
|
863 | 876 | '.saf': 'application/vnd.yamaha.smaf-audio', |
|
864 | 877 | '.sage': 'text/x-python', |
|
865 | 878 | '.sass': 'text/x-sass', |
|
866 | 879 | '.sbml': 'application/sbml+xml', |
|
867 | 880 | '.sc': 'application/vnd.ibm.secure-container', |
|
868 | 881 | '.scala': 'text/x-scala', |
|
869 | 882 | '.scaml': 'text/x-scaml', |
|
870 | 883 | '.scd': 'application/x-msschedule', |
|
871 | 884 | '.sce': 'text/scilab', |
|
872 | 885 | '.sci': 'text/scilab', |
|
873 | 886 | '.scm': 'application/vnd.lotus-screencam', |
|
874 | 887 | '.scq': 'application/scvp-cv-request', |
|
875 | 888 | '.scs': 'application/scvp-cv-response', |
|
876 | 889 | '.scss': 'text/x-scss', |
|
877 | 890 | '.scurl': 'text/vnd.curl.scurl', |
|
878 | 891 | '.sda': 'application/vnd.stardivision.draw', |
|
879 | 892 | '.sdc': 'application/vnd.stardivision.calc', |
|
880 | 893 | '.sdd': 'application/vnd.stardivision.impress', |
|
881 | 894 | '.sdkd': 'application/vnd.solent.sdkm+xml', |
|
882 | 895 | '.sdkm': 'application/vnd.solent.sdkm+xml', |
|
883 | 896 | '.sdp': 'application/sdp', |
|
884 | 897 | '.sdw': 'application/vnd.stardivision.writer', |
|
885 | 898 | '.see': 'application/vnd.seemail', |
|
886 | 899 | '.seed': 'application/vnd.fdsn.seed', |
|
887 | 900 | '.sema': 'application/vnd.sema', |
|
888 | 901 | '.semd': 'application/vnd.semd', |
|
889 | 902 | '.semf': 'application/vnd.semf', |
|
890 | 903 | '.ser': 'application/java-serialized-object', |
|
891 | 904 | '.setpay': 'application/set-payment-initiation', |
|
892 | 905 | '.setreg': 'application/set-registration-initiation', |
|
893 | 906 | '.sfd-hdstx': 'application/vnd.hydrostatix.sof-data', |
|
894 | 907 | '.sfs': 'application/vnd.spotfire.sfs', |
|
895 | 908 | '.sgl': 'application/vnd.stardivision.writer-global', |
|
896 | 909 | '.sgm': 'text/sgml', |
|
897 | 910 | '.sgml': 'text/sgml', |
|
898 | 911 | '.sh': 'application/x-sh', |
|
899 | 912 | '.sh-session': 'application/x-shell-session', |
|
900 | 913 | '.shar': 'application/x-shar', |
|
901 | 914 | '.shell-session': 'application/x-sh-session', |
|
902 | 915 | '.shf': 'application/shf+xml', |
|
903 | 916 | '.sig': 'application/pgp-signature', |
|
904 | 917 | '.silo': 'model/mesh', |
|
905 | 918 | '.sis': 'application/vnd.symbian.install', |
|
906 | 919 | '.sisx': 'application/vnd.symbian.install', |
|
907 | 920 | '.sit': 'application/x-stuffit', |
|
908 | 921 | '.sitx': 'application/x-stuffitx', |
|
909 | 922 | '.skd': 'application/vnd.koan', |
|
910 | 923 | '.skm': 'application/vnd.koan', |
|
911 | 924 | '.skp': 'application/vnd.koan', |
|
912 | 925 | '.skt': 'application/vnd.koan', |
|
913 | 926 | '.sldm': 'application/vnd.ms-powerpoint.slide.macroenabled.12', |
|
914 | 927 | '.sldx': 'application/vnd.openxmlformats-officedocument.presentationml.slide', |
|
915 | 928 | '.slt': 'application/vnd.epson.salt', |
|
916 | 929 | '.sm': 'application/vnd.stepmania.stepchart', |
|
917 | 930 | '.smali': 'text/smali', |
|
918 | 931 | '.smf': 'application/vnd.stardivision.math', |
|
919 | 932 | '.smi': 'application/smil+xml', |
|
920 | 933 | '.smil': 'application/smil+xml', |
|
921 | 934 | '.sml': 'text/x-standardml', |
|
922 | 935 | '.snd': 'audio/basic', |
|
923 | 936 | '.snf': 'application/x-font-snf', |
|
924 | 937 | '.snobol': 'text/x-snobol', |
|
925 | 938 | '.so': 'application/octet-stream', |
|
926 | 939 | '.sp': 'text/x-sourcepawn', |
|
927 | 940 | '.spc': 'application/x-pkcs7-certificates', |
|
928 | 941 | '.spec': 'text/x-rpm-spec', |
|
929 | 942 | '.spf': 'application/vnd.yamaha.smaf-phrase', |
|
930 | 943 | '.spl': 'application/x-futuresplash', |
|
931 | 944 | '.spot': 'text/vnd.in3d.spot', |
|
932 | 945 | '.spp': 'application/scvp-vp-response', |
|
933 | 946 | '.spq': 'application/scvp-vp-request', |
|
934 | 947 | '.spt': 'application/x-cheetah', |
|
935 | 948 | '.spx': 'audio/ogg', |
|
936 | 949 | '.sql': 'text/x-sql', |
|
937 | 950 | '.sqlite3-console': 'text/x-sqlite3-console', |
|
938 | 951 | '.src': 'application/x-wais-source', |
|
939 | 952 | '.sru': 'application/sru+xml', |
|
940 | 953 | '.srx': 'application/sparql-results+xml', |
|
941 | 954 | '.ss': 'text/x-scheme', |
|
942 | 955 | '.sse': 'application/vnd.kodak-descriptor', |
|
943 | 956 | '.ssf': 'application/vnd.epson.ssf', |
|
944 | 957 | '.ssml': 'application/ssml+xml', |
|
945 | 958 | '.ssp': 'application/x-ssp', |
|
946 | 959 | '.st': 'application/vnd.sailingtracker.track', |
|
947 | 960 | '.stc': 'application/vnd.sun.xml.calc.template', |
|
948 | 961 | '.std': 'application/vnd.sun.xml.draw.template', |
|
949 | 962 | '.stf': 'application/vnd.wt.stf', |
|
950 | 963 | '.sti': 'application/vnd.sun.xml.impress.template', |
|
951 | 964 | '.stk': 'application/hyperstudio', |
|
952 | 965 | '.stl': 'application/vnd.ms-pki.stl', |
|
953 | 966 | '.str': 'application/vnd.pg.format', |
|
954 | 967 | '.stw': 'application/vnd.sun.xml.writer.template', |
|
955 | 968 | '.sub': 'image/vnd.dvb.subtitle', |
|
956 | 969 | '.sus': 'application/vnd.sus-calendar', |
|
957 | 970 | '.susp': 'application/vnd.sus-calendar', |
|
958 | 971 | '.sv': 'text/x-systemverilog', |
|
959 | 972 | '.sv4cpio': 'application/x-sv4cpio', |
|
960 | 973 | '.sv4crc': 'application/x-sv4crc', |
|
961 | 974 | '.svc': 'application/vnd.dvb.service', |
|
962 | 975 | '.svd': 'application/vnd.svd', |
|
963 | 976 | '.svg': 'image/svg+xml', |
|
964 | 977 | '.svgz': 'image/svg+xml', |
|
965 | 978 | '.svh': 'text/x-systemverilog', |
|
966 | 979 | '.swa': 'application/x-director', |
|
967 | 980 | '.swf': 'application/x-shockwave-flash', |
|
968 | 981 | '.swi': 'application/vnd.aristanetworks.swi', |
|
969 | 982 | '.sxc': 'application/vnd.sun.xml.calc', |
|
970 | 983 | '.sxd': 'application/vnd.sun.xml.draw', |
|
971 | 984 | '.sxg': 'application/vnd.sun.xml.writer.global', |
|
972 | 985 | '.sxi': 'application/vnd.sun.xml.impress', |
|
973 | 986 | '.sxm': 'application/vnd.sun.xml.math', |
|
974 | 987 | '.sxw': 'application/vnd.sun.xml.writer', |
|
975 | 988 | '.t': 'text/troff', |
|
976 | 989 | '.tac': 'text/x-python', |
|
977 | 990 | '.tao': 'application/vnd.tao.intent-module-archive', |
|
978 | 991 | '.tar': 'application/x-tar', |
|
979 | 992 | '.tcap': 'application/vnd.3gpp2.tcap', |
|
980 | 993 | '.tcl': 'application/x-tcl', |
|
981 | 994 | '.tcsh': 'application/x-csh', |
|
982 | 995 | '.tea': 'text/x-tea', |
|
983 | 996 | '.teacher': 'application/vnd.smart.teacher', |
|
984 | 997 | '.tei': 'application/tei+xml', |
|
985 | 998 | '.teicorpus': 'application/tei+xml', |
|
986 | 999 | '.tex': 'application/x-tex', |
|
987 | 1000 | '.texi': 'application/x-texinfo', |
|
988 | 1001 | '.texinfo': 'application/x-texinfo', |
|
989 | 1002 | '.text': 'text/plain', |
|
990 | 1003 | '.tfi': 'application/thraud+xml', |
|
991 | 1004 | '.tfm': 'application/x-tex-tfm', |
|
992 | 1005 | '.thmx': 'application/vnd.ms-officetheme', |
|
993 | 1006 | '.tif': 'image/tiff', |
|
994 | 1007 | '.tiff': 'image/tiff', |
|
995 | 1008 | '.tmo': 'application/vnd.tmobile-livetv', |
|
996 | 1009 | '.tmpl': 'application/x-cheetah', |
|
997 | 1010 | '.toc': 'text/x-tex', |
|
998 | 1011 | '.torrent': 'application/x-bittorrent', |
|
999 | 1012 | '.tpl': 'application/vnd.groove-tool-template', |
|
1000 | 1013 | '.tpt': 'application/vnd.trid.tpt', |
|
1001 | 1014 | '.tr': 'text/troff', |
|
1002 | 1015 | '.tra': 'application/vnd.trueapp', |
|
1003 | 1016 | '.trm': 'application/x-msterminal', |
|
1004 | 1017 | '.ts': 'video/mp2t', |
|
1005 | 1018 | '.tsd': 'application/timestamped-data', |
|
1006 | 1019 | '.tst': 'text/scilab', |
|
1007 | 1020 | '.tsv': 'text/tab-separated-values', |
|
1008 | 1021 | '.ttc': 'application/x-font-ttf', |
|
1009 | 1022 | '.ttf': 'application/x-font-ttf', |
|
1010 | 1023 | '.ttl': 'text/turtle', |
|
1011 | 1024 | '.twd': 'application/vnd.simtech-mindmapper', |
|
1012 | 1025 | '.twds': 'application/vnd.simtech-mindmapper', |
|
1013 | 1026 | '.txd': 'application/vnd.genomatix.tuxedo', |
|
1014 | 1027 | '.txf': 'application/vnd.mobius.txf', |
|
1015 | 1028 | '.txt': 'text/plain', |
|
1016 | 1029 | '.u': 'application/x-urbiscript', |
|
1017 | 1030 | '.u32': 'application/x-authorware-bin', |
|
1018 | 1031 | '.udeb': 'application/x-debian-package', |
|
1019 | 1032 | '.ufd': 'application/vnd.ufdl', |
|
1020 | 1033 | '.ufdl': 'application/vnd.ufdl', |
|
1021 | 1034 | '.umj': 'application/vnd.umajin', |
|
1022 | 1035 | '.unityweb': 'application/vnd.unity', |
|
1023 | 1036 | '.uoml': 'application/vnd.uoml+xml', |
|
1024 | 1037 | '.uri': 'text/uri-list', |
|
1025 | 1038 | '.uris': 'text/uri-list', |
|
1026 | 1039 | '.urls': 'text/uri-list', |
|
1027 | 1040 | '.ustar': 'application/x-ustar', |
|
1028 | 1041 | '.utz': 'application/vnd.uiq.theme', |
|
1029 | 1042 | '.uu': 'text/x-uuencode', |
|
1030 | 1043 | '.uva': 'audio/vnd.dece.audio', |
|
1031 | 1044 | '.uvd': 'application/vnd.dece.data', |
|
1032 | 1045 | '.uvf': 'application/vnd.dece.data', |
|
1033 | 1046 | '.uvg': 'image/vnd.dece.graphic', |
|
1034 | 1047 | '.uvh': 'video/vnd.dece.hd', |
|
1035 | 1048 | '.uvi': 'image/vnd.dece.graphic', |
|
1036 | 1049 | '.uvm': 'video/vnd.dece.mobile', |
|
1037 | 1050 | '.uvp': 'video/vnd.dece.pd', |
|
1038 | 1051 | '.uvs': 'video/vnd.dece.sd', |
|
1039 | 1052 | '.uvt': 'application/vnd.dece.ttml+xml', |
|
1040 | 1053 | '.uvu': 'video/vnd.uvvu.mp4', |
|
1041 | 1054 | '.uvv': 'video/vnd.dece.video', |
|
1042 | 1055 | '.uvva': 'audio/vnd.dece.audio', |
|
1043 | 1056 | '.uvvd': 'application/vnd.dece.data', |
|
1044 | 1057 | '.uvvf': 'application/vnd.dece.data', |
|
1045 | 1058 | '.uvvg': 'image/vnd.dece.graphic', |
|
1046 | 1059 | '.uvvh': 'video/vnd.dece.hd', |
|
1047 | 1060 | '.uvvi': 'image/vnd.dece.graphic', |
|
1048 | 1061 | '.uvvm': 'video/vnd.dece.mobile', |
|
1049 | 1062 | '.uvvp': 'video/vnd.dece.pd', |
|
1050 | 1063 | '.uvvs': 'video/vnd.dece.sd', |
|
1051 | 1064 | '.uvvt': 'application/vnd.dece.ttml+xml', |
|
1052 | 1065 | '.uvvu': 'video/vnd.uvvu.mp4', |
|
1053 | 1066 | '.uvvv': 'video/vnd.dece.video', |
|
1054 | 1067 | '.uvvx': 'application/vnd.dece.unspecified', |
|
1055 | 1068 | '.uvx': 'application/vnd.dece.unspecified', |
|
1056 | 1069 | '.v': 'text/x-verilog', |
|
1057 | 1070 | '.vala': 'text/x-vala', |
|
1058 | 1071 | '.vapi': 'text/x-vala', |
|
1059 | 1072 | '.vark': 'text/x-gosu', |
|
1060 | 1073 | '.vb': 'text/vbscript', |
|
1061 | 1074 | '.vcd': 'application/x-cdlink', |
|
1062 | 1075 | '.vcf': 'text/x-vcard', |
|
1063 | 1076 | '.vcg': 'application/vnd.groove-vcard', |
|
1064 | 1077 | '.vcs': 'text/x-vcalendar', |
|
1065 | 1078 | '.vcx': 'application/vnd.vcx', |
|
1066 | 1079 | '.vert': 'text/x-glslsrc', |
|
1067 | 1080 | '.vhd': 'text/x-vhdl', |
|
1068 | 1081 | '.vhdl': 'text/x-vhdl', |
|
1069 | 1082 | '.vim': 'text/x-vim', |
|
1070 | 1083 | '.vis': 'application/vnd.visionary', |
|
1071 | 1084 | '.viv': 'video/vnd.vivo', |
|
1072 | 1085 | '.vor': 'application/vnd.stardivision.writer', |
|
1073 | 1086 | '.vox': 'application/x-authorware-bin', |
|
1074 | 1087 | '.vrml': 'model/vrml', |
|
1075 | 1088 | '.vsd': 'application/vnd.visio', |
|
1076 | 1089 | '.vsf': 'application/vnd.vsf', |
|
1077 | 1090 | '.vss': 'application/vnd.visio', |
|
1078 | 1091 | '.vst': 'application/vnd.visio', |
|
1079 | 1092 | '.vsw': 'application/vnd.visio', |
|
1080 | 1093 | '.vtu': 'model/vnd.vtu', |
|
1081 | 1094 | '.vxml': 'application/voicexml+xml', |
|
1082 | 1095 | '.w3d': 'application/x-director', |
|
1083 | 1096 | '.wad': 'application/x-doom', |
|
1084 | 1097 | '.wav': 'audio/x-wav', |
|
1085 | 1098 | '.wax': 'audio/x-ms-wax', |
|
1086 | 1099 | '.wbmp': 'image/vnd.wap.wbmp', |
|
1087 | 1100 | '.wbs': 'application/vnd.criticaltools.wbs+xml', |
|
1088 | 1101 | '.wbxml': 'application/vnd.wap.wbxml', |
|
1089 | 1102 | '.wcm': 'application/vnd.ms-works', |
|
1090 | 1103 | '.wdb': 'application/vnd.ms-works', |
|
1091 | 1104 | '.weba': 'audio/webm', |
|
1092 | 1105 | '.webm': 'video/webm', |
|
1093 | 1106 | '.webp': 'image/webp', |
|
1094 | 1107 | '.weechatlog': 'text/x-irclog', |
|
1095 | 1108 | '.wg': 'application/vnd.pmi.widget', |
|
1096 | 1109 | '.wgt': 'application/widget', |
|
1097 | 1110 | '.wiz': 'application/msword', |
|
1098 | 1111 | '.wks': 'application/vnd.ms-works', |
|
1099 | 1112 | '.wlua': 'text/x-lua', |
|
1100 | 1113 | '.wm': 'video/x-ms-wm', |
|
1101 | 1114 | '.wma': 'audio/x-ms-wma', |
|
1102 | 1115 | '.wmd': 'application/x-ms-wmd', |
|
1103 | 1116 | '.wmf': 'application/x-msmetafile', |
|
1104 | 1117 | '.wml': 'text/vnd.wap.wml', |
|
1105 | 1118 | '.wmlc': 'application/vnd.wap.wmlc', |
|
1106 | 1119 | '.wmls': 'text/vnd.wap.wmlscript', |
|
1107 | 1120 | '.wmlsc': 'application/vnd.wap.wmlscriptc', |
|
1108 | 1121 | '.wmv': 'video/x-ms-wmv', |
|
1109 | 1122 | '.wmx': 'video/x-ms-wmx', |
|
1110 | 1123 | '.wmz': 'application/x-ms-wmz', |
|
1111 | 1124 | '.woff': 'application/x-font-woff', |
|
1112 | 1125 | '.wpd': 'application/vnd.wordperfect', |
|
1113 | 1126 | '.wpl': 'application/vnd.ms-wpl', |
|
1114 | 1127 | '.wps': 'application/vnd.ms-works', |
|
1115 | 1128 | '.wqd': 'application/vnd.wqd', |
|
1116 | 1129 | '.wri': 'application/x-mswrite', |
|
1117 | 1130 | '.wrl': 'model/vrml', |
|
1118 | 1131 | '.wsdl': 'application/wsdl+xml', |
|
1119 | 1132 | '.wspolicy': 'application/wspolicy+xml', |
|
1120 | 1133 | '.wtb': 'application/vnd.webturbo', |
|
1121 | 1134 | '.wvx': 'video/x-ms-wvx', |
|
1122 | 1135 | '.x': 'text/x-logos', |
|
1123 | 1136 | '.x32': 'application/x-authorware-bin', |
|
1124 | 1137 | '.x3d': 'application/vnd.hzn-3d-crossword', |
|
1125 | 1138 | '.xap': 'application/x-silverlight-app', |
|
1126 | 1139 | '.xar': 'application/vnd.xara', |
|
1127 | 1140 | '.xbap': 'application/x-ms-xbap', |
|
1128 | 1141 | '.xbd': 'application/vnd.fujixerox.docuworks.binder', |
|
1129 | 1142 | '.xbm': 'image/x-xbitmap', |
|
1130 | 1143 | '.xdf': 'application/xcap-diff+xml', |
|
1131 | 1144 | '.xdm': 'application/vnd.syncml.dm+xml', |
|
1132 | 1145 | '.xdp': 'application/vnd.adobe.xdp+xml', |
|
1133 | 1146 | '.xdssc': 'application/dssc+xml', |
|
1134 | 1147 | '.xdw': 'application/vnd.fujixerox.docuworks', |
|
1135 | 1148 | '.xenc': 'application/xenc+xml', |
|
1136 | 1149 | '.xer': 'application/patch-ops-error+xml', |
|
1137 | 1150 | '.xfdf': 'application/vnd.adobe.xfdf', |
|
1138 | 1151 | '.xfdl': 'application/vnd.xfdl', |
|
1139 | 1152 | '.xht': 'application/xhtml+xml', |
|
1140 | 1153 | '.xhtml': 'application/xhtml+xml', |
|
1141 | 1154 | '.xhvml': 'application/xv+xml', |
|
1142 | 1155 | '.xi': 'text/x-logos', |
|
1143 | 1156 | '.xif': 'image/vnd.xiff', |
|
1144 | 1157 | '.xla': 'application/vnd.ms-excel', |
|
1145 | 1158 | '.xlam': 'application/vnd.ms-excel.addin.macroenabled.12', |
|
1146 | 1159 | '.xlb': 'application/vnd.ms-excel', |
|
1147 | 1160 | '.xlc': 'application/vnd.ms-excel', |
|
1148 | 1161 | '.xlm': 'application/vnd.ms-excel', |
|
1149 | 1162 | '.xls': 'application/vnd.ms-excel', |
|
1150 | 1163 | '.xlsb': 'application/vnd.ms-excel.sheet.binary.macroenabled.12', |
|
1151 | 1164 | '.xlsm': 'application/vnd.ms-excel.sheet.macroenabled.12', |
|
1152 | 1165 | '.xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', |
|
1153 | 1166 | '.xlt': 'application/vnd.ms-excel', |
|
1154 | 1167 | '.xltm': 'application/vnd.ms-excel.template.macroenabled.12', |
|
1155 | 1168 | '.xltx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', |
|
1156 | 1169 | '.xlw': 'application/vnd.ms-excel', |
|
1157 | 1170 | '.xm': 'text/x-logos', |
|
1158 | 1171 | '.xmi': 'text/x-logos', |
|
1159 | 1172 | '.xml': 'application/xml', |
|
1160 | 1173 | '.xo': 'application/vnd.olpc-sugar', |
|
1161 | 1174 | '.xop': 'application/xop+xml', |
|
1162 | 1175 | '.xpdl': 'application/xml', |
|
1163 | 1176 | '.xpi': 'application/x-xpinstall', |
|
1164 | 1177 | '.xpl': 'application/xsl+xml', |
|
1165 | 1178 | '.xpm': 'image/x-xpixmap', |
|
1166 | 1179 | '.xpr': 'application/vnd.is-xpr', |
|
1167 | 1180 | '.xps': 'application/vnd.ms-xpsdocument', |
|
1168 | 1181 | '.xpw': 'application/vnd.intercon.formnet', |
|
1169 | 1182 | '.xpx': 'application/vnd.intercon.formnet', |
|
1170 | 1183 | '.xq': 'application/xquery', |
|
1171 | 1184 | '.xql': 'application/xquery', |
|
1172 | 1185 | '.xqm': 'application/xquery', |
|
1173 | 1186 | '.xquery': 'application/xquery', |
|
1174 | 1187 | '.xqy': 'application/xquery', |
|
1175 | 1188 | '.xsd': 'application/xml', |
|
1176 | 1189 | '.xsl': 'application/xml', |
|
1177 | 1190 | '.xslt': 'application/xslt+xml', |
|
1178 | 1191 | '.xsm': 'application/vnd.syncml+xml', |
|
1179 | 1192 | '.xspf': 'application/xspf+xml', |
|
1180 | 1193 | '.xtend': 'text/x-xtend', |
|
1181 | 1194 | '.xul': 'application/vnd.mozilla.xul+xml', |
|
1182 | 1195 | '.xvm': 'application/xv+xml', |
|
1183 | 1196 | '.xvml': 'application/xv+xml', |
|
1184 | 1197 | '.xwd': 'image/x-xwindowdump', |
|
1185 | 1198 | '.xyz': 'chemical/x-xyz', |
|
1186 | 1199 | '.yaml': 'text/x-yaml', |
|
1187 | 1200 | '.yang': 'application/yang', |
|
1188 | 1201 | '.yin': 'application/yin+xml', |
|
1189 | 1202 | '.yml': 'text/x-yaml', |
|
1190 | 1203 | '.zaz': 'application/vnd.zzazz.deck+xml', |
|
1191 | 1204 | '.zip': 'application/zip', |
|
1192 | 1205 | '.zir': 'application/vnd.zul', |
|
1193 | 1206 | '.zirz': 'application/vnd.zul', |
|
1194 | 1207 | '.zmm': 'application/vnd.handheld-entertainment+xml'} |
|
1195 | 1208 | ] |
|
1196 | 1209 | |
|
1197 | 1210 | |
|
1198 | 1211 | def get_mimetypes_db(extra_types=None): |
|
1199 | 1212 | import mimetypes |
|
1200 | 1213 | types_map = TYPES_MAP |
|
1201 | 1214 | if extra_types: |
|
1202 | 1215 | types_map = TYPES_MAP[::] # copy the initial version for extending |
|
1203 | 1216 | types_map[1].update(extra_types) |
|
1204 | 1217 | db = mimetypes.MimeTypes() |
|
1205 | 1218 | db.types_map = types_map |
|
1219 | db.encodings_map.update(DEFAULTS['encodings_map']) | |
|
1220 | db.suffix_map.update(DEFAULTS['suffix_map']) | |
|
1206 | 1221 | return db |
General Comments 0
You need to be logged in to leave comments.
Login now