-
Notifications
You must be signed in to change notification settings - Fork 95
/
Copy pathmime.js
46 lines (41 loc) · 930 Bytes
/
mime.js
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
/**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
const openMimetypesMarkdown = [
'text/markdown',
]
const openMimetypesPlainText = [
'text/plain',
'application/cmd',
'application/x-empty',
'application/x-msdos-program',
'application/javascript',
'application/json',
'application/x-perl',
'application/x-php',
'application/x-tex',
'application/xml',
'application/yaml',
'text/asciidoc',
'text/css',
'text/html',
'text/org',
'text/x-c',
'text/x-c++src',
'text/x-h',
'text/x-java-source',
'text/x-ldif',
'text/x-nfo',
'text/x-python',
'text/x-shellscript',
]
if (!OC.appswebroots?.richdocuments && !OC.appswebroots?.onlyoffice) {
openMimetypesPlainText.push('text/csv')
}
const openMimetypes = [...openMimetypesMarkdown, ...openMimetypesPlainText]
export {
openMimetypes,
openMimetypesMarkdown,
openMimetypesPlainText,
}