diff options
author | Luka Trovic <luka@nextcloud.com> | 2022-05-18 12:11:12 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2022-06-07 21:54:27 +0200 |
commit | 0858d3d51478bf9d16aac56106fd6ffeab022f69 (patch) | |
tree | a6beaeffb304f7c7094325bf5ec8104466a7a02c | |
parent | dcf25d6c7716daa08eb6af07a720c0a0b7b6eda6 (diff) | |
download | nextcloud-server-0858d3d51478bf9d16aac56106fd6ffeab022f69.tar.gz nextcloud-server-0858d3d51478bf9d16aac56106fd6ffeab022f69.zip |
feat: add docxf and form mimetypes
signed-off-by: Luka Trovic <luka@nextcloud.com>
-rw-r--r-- | core/js/mimetypelist.js | 5 | ||||
-rw-r--r-- | lib/private/Repair/RepairMimeTypes.php | 13 | ||||
-rw-r--r-- | resources/config/mimetypealiases.dist.json | 4 | ||||
-rw-r--r-- | version.php | 2 |
4 files changed, 21 insertions, 3 deletions
diff --git a/core/js/mimetypelist.js b/core/js/mimetypelist.js index a891aeec95c..11adeeec8fc 100644 --- a/core/js/mimetypelist.js +++ b/core/js/mimetypelist.js @@ -110,7 +110,10 @@ OC.MimeTypeList={ "application/internet-shortcut": "link", "application/km": "mindmap", "application/x-freemind": "mindmap", - "application/vnd.xmind.workbook": "mindmap" + "application/vnd.xmind.workbook": "mindmap", + "image/targa": "image/tga", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.oform": "x-office/form", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxf": "x-office/form-template" }, files: [ "application", diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php index 61512627258..5b216331dc7 100644 --- a/lib/private/Repair/RepairMimeTypes.php +++ b/lib/private/Repair/RepairMimeTypes.php @@ -211,6 +211,15 @@ class RepairMimeTypes implements IRepairStep { return $this->updateMimetypes($updatedMimetypes); } + private function introduceOnlyofficeFormType() { + $updatedMimetypes = [ + "oform" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document.oform", + "docxf" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxf", + ]; + + return $this->updateMimetypes($updatedMimetypes); + } + /** * Fix mime types @@ -260,5 +269,9 @@ class RepairMimeTypes implements IRepairStep { if (version_compare($ocVersionFromBeforeUpdate, '23.0.0.2', '<') && $this->introduceFlatOpenDocumentType()) { $out->info('Fixed Flat OpenDocument mime types'); } + + if (version_compare($ocVersionFromBeforeUpdate, '25.0.0.2', '<') && $this->introduceOnlyofficeFormType()) { + $out->info('Fixed ONLYOFFICE Forms OpenXML mime types'); + } } } diff --git a/resources/config/mimetypealiases.dist.json b/resources/config/mimetypealiases.dist.json index 891b9a72ce5..1840dca5fb9 100644 --- a/resources/config/mimetypealiases.dist.json +++ b/resources/config/mimetypealiases.dist.json @@ -111,6 +111,8 @@ "application/km": "mindmap", "application/x-freemind": "mindmap", "application/vnd.xmind.workbook": "mindmap", - "image/targa": "image/tga" + "image/targa": "image/tga", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.oform": "x-office/form", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxf": "x-office/form-template" } diff --git a/version.php b/version.php index ee6b872345a..73910f1460d 100644 --- a/version.php +++ b/version.php @@ -30,7 +30,7 @@ // between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel // when updating major/minor version number. -$OC_Version = [25, 0, 0, 1]; +$OC_Version = [25, 0, 0, 2]; // The human readable string $OC_VersionString = '25.0.0 dev'; |