Skip to content

Commit

Permalink
Merge pull request #39594 from /issues/39593
Browse files Browse the repository at this point in the history
Add support for the x-office/drawing mimetype
  • Loading branch information
phil-davis authored Dec 15, 2021
2 parents 32339b3 + 59d9f58 commit f1b53cc
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/files/appinfo/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
$templateManager->registerTemplate('application/vnd.oasis.opendocument.presentation', 'core/templates/filetemplates/template.odp');
$templateManager->registerTemplate('application/vnd.oasis.opendocument.text', 'core/templates/filetemplates/template.odt');
$templateManager->registerTemplate('application/vnd.oasis.opendocument.spreadsheet', 'core/templates/filetemplates/template.ods');
$templateManager->registerTemplate('application/vnd.oasis.opendocument.graphics', 'core/templates/filetemplates/template.odg');

\OCA\Files\App::getNavigationManager()->add(function () {
$l = \OC::$server->getL10N('files');
Expand Down
4 changes: 4 additions & 0 deletions changelog/10.9.0_2021-12-09/39594
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Enhancement: Add support for the x-office/drawing mimetype

https://github.com/owncloud/core/pull/39594
https://github.com/owncloud/core/issues/39593
2 changes: 2 additions & 0 deletions core/img/filetypes/x-office-drawing.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions core/js/mimetypelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ OC.MimeTypeList={
"application/vnd.oasis.opendocument.text-master": "x-office/document",
"application/vnd.oasis.opendocument.text-template": "x-office/document",
"application/vnd.oasis.opendocument.text-web": "x-office/document",
"application/vnd.oasis.opendocument.graphics-flat-xml": "x-office/drawing",
"application/vnd.oasis.opendocument.graphics": "x-office/drawing",
"application/vnd.oasis.opendocument.graphics-template": "x-office/drawing",
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "x-office/presentation",
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "x-office/presentation",
"application/vnd.openxmlformats-officedocument.presentationml.template": "x-office/presentation",
Expand Down Expand Up @@ -108,6 +111,7 @@ OC.MimeTypeList={
"video",
"x-office-document",
"x-office-presentation",
"x-office-drawing",
"x-office-spreadsheet"
],
themes: []
Expand Down
Binary file added core/templates/filetemplates/template.odg
Binary file not shown.
3 changes: 3 additions & 0 deletions resources/config/mimetypealiases.dist.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
"application/vnd.oasis.opendocument.text-master": "x-office/document",
"application/vnd.oasis.opendocument.text-template": "x-office/document",
"application/vnd.oasis.opendocument.text-web": "x-office/document",
"application/vnd.oasis.opendocument.graphics-flat-xml": "x-office/drawing",
"application/vnd.oasis.opendocument.graphics": "x-office/drawing",
"application/vnd.oasis.opendocument.graphics-template": "x-office/drawing",
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "x-office/presentation",
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "x-office/presentation",
"application/vnd.openxmlformats-officedocument.presentationml.template": "x-office/presentation",
Expand Down
1 change: 1 addition & 0 deletions resources/config/mimetypemapping.dist.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"exe": ["application/x-ms-dos-executable"],
"flac": ["audio/flac"],
"flv": ["video/x-flv"],
"fodg": ["application/vnd.oasis.opendocument.graphics-flat-xml"],
"gif": ["image/gif"],
"gz": ["application/x-gzip", "application/gzip"],
"gzip": ["application/x-gzip", "application/gzip"],
Expand Down

0 comments on commit f1b53cc

Please sign in to comment.