Skip to content

Commit

Permalink
Do not register text/csv mimetype when office can handle it
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
  • Loading branch information
juliusknorr authored and nextcloud-command committed May 27, 2022
1 parent ab2ee05 commit b3f61e3
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 16 deletions.
4 changes: 2 additions & 2 deletions js/editor-rich.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor-rich.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-files.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-text.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-text.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-viewer.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/helpers/mime.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const openMimetypesPlainText = [
'application/xml',
'application/yaml',
'text/css',
'text/csv',
'text/html',
'text/org',
'text/x-c',
Expand All @@ -49,6 +48,10 @@ const openMimetypesPlainText = [
'text/x-shellscript',
]

if (!window.oc_appswebroots?.richdocuments && !window.oc_appswebroots?.onlyoffice) {
openMimetypesPlainText.push('text/csv')
}

const openMimetypes = [...openMimetypesMarkdown, ...openMimetypesPlainText]

export {
Expand Down

0 comments on commit b3f61e3

Please sign in to comment.