]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: add mimetype for eml and msg 41803/head
authorDaniel Kesselberg <mail@danielkesselberg.de>
Tue, 28 Nov 2023 16:12:21 +0000 (17:12 +0100)
committerDaniel Kesselberg <mail@danielkesselberg.de>
Tue, 28 Nov 2023 16:12:21 +0000 (17:12 +0100)
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
lib/private/Repair/RepairMimeTypes.php
resources/config/mimetypemapping.dist.json
version.php

index f951c3b916df6dd9cb77e079b5c9204df96d300d..0d9e744b213b9aa33c85360353bc8cf94a8fa3c1 100644 (file)
@@ -237,6 +237,15 @@ class RepairMimeTypes implements IRepairStep {
                return $this->updateMimetypes($updatedMimetypes);
        }
 
+       private function introduceEmlAndMsgFormatType() {
+               $updatedMimetypes = [
+                       'eml' => 'message/rfc822',
+                       'msg' => 'application/x-ole-storage',
+               ];
+
+               return $this->updateMimetypes($updatedMimetypes);
+       }
+
        /**
         * Fix mime types
         */
@@ -297,5 +306,9 @@ class RepairMimeTypes implements IRepairStep {
                if (version_compare($ocVersionFromBeforeUpdate, '28.0.0.5', '<') && $this->introduceEnhancedMetafileFormatType()) {
                        $out->info('Fixed Enhanced Metafile Format mime types');
                }
+
+               if (version_compare($ocVersionFromBeforeUpdate, '29.0.0.1', '<') && $this->introduceEmlAndMsgFormatType()) {
+                       $out->info('Fixed eml and msg mime type');
+               }
        }
 }
index 47b207d6bccda5e344f36b41749969705216c528..b28dd42cd1e9c4c7e05356b09bdcecd5676d45a6 100644 (file)
@@ -53,6 +53,7 @@
        "dotx": ["application/vnd.openxmlformats-officedocument.wordprocessingml.template"],
        "dv": ["video/dv"],
        "emf": ["image/emf"],
+       "eml": ["message/rfc822", "text/plain"],
        "eot": ["application/vnd.ms-fontobject"],
        "eps": ["application/postscript"],
        "epub": ["application/epub+zip"],
        "mpeg": ["video/mpeg"],
        "mpg": ["video/mpeg"],
        "mpo": ["image/jpeg"],
+       "msg": ["application/x-ole-storage", "text/plain"],
        "msi": ["application/x-msi"],
        "mt2s": ["video/MP2T"],
        "mts": ["video/MP2T"],
index 7cf870d5d0afda0072b2df98897fcc7df3f561de..65fd747e718654ba6f6213b456a1bb487a4e66a7 100644 (file)
@@ -30,7 +30,7 @@
 // between betas, final and RCs. This is _not_ the public version number. Reset minor/patch level
 // when updating major/minor version number.
 
-$OC_Version = [29, 0, 0, 0];
+$OC_Version = [29, 0, 0, 1];
 
 // The human-readable string
 $OC_VersionString = '29.0.0 dev';