Skip to content

Commit

Permalink
Merge pull request #2453 from nextcloud/backport/2448/stable24
Browse files Browse the repository at this point in the history
[stable24] Do not register text/csv mimetype when office can handle it
  • Loading branch information
juliusknorr authored Jun 7, 2022
2 parents 8def668 + b0c8dd0 commit 740b9e5
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 740b9e5

Please sign in to comment.