summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuka Trovic <luka@nextcloud.com>2022-05-18 12:11:12 +0200
committerJulius Härtl <jus@bitgrid.net>2022-06-07 21:54:27 +0200
commit0858d3d51478bf9d16aac56106fd6ffeab022f69 (patch)
treea6beaeffb304f7c7094325bf5ec8104466a7a02c /lib
parentdcf25d6c7716daa08eb6af07a720c0a0b7b6eda6 (diff)
downloadnextcloud-server-0858d3d51478bf9d16aac56106fd6ffeab022f69.tar.gz
nextcloud-server-0858d3d51478bf9d16aac56106fd6ffeab022f69.zip
feat: add docxf and form mimetypes
signed-off-by: Luka Trovic <luka@nextcloud.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Repair/RepairMimeTypes.php13
1 files changed, 13 insertions, 0 deletions
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');
+ }
}
}