Skip to content

Commit 64c7221

Browse files
Merge pull request #41868 from nextcloud/mime-type-msg-eml-28
[stable28] fix: add mimetype for eml and msg
2 parents 1b8e30d + 1081c4a commit 64c7221

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

lib/private/Repair/RepairMimeTypes.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,15 @@ private function introduceEnhancedMetafileFormatType() {
237237
return $this->updateMimetypes($updatedMimetypes);
238238
}
239239

240+
private function introduceEmlAndMsgFormatType() {
241+
$updatedMimetypes = [
242+
'eml' => 'message/rfc822',
243+
'msg' => 'application/vnd.ms-outlook',
244+
];
245+
246+
return $this->updateMimetypes($updatedMimetypes);
247+
}
248+
240249
/**
241250
* Fix mime types
242251
*/
@@ -297,5 +306,9 @@ public function run(IOutput $out) {
297306
if (version_compare($ocVersionFromBeforeUpdate, '28.0.0.5', '<') && $this->introduceEnhancedMetafileFormatType()) {
298307
$out->info('Fixed Enhanced Metafile Format mime types');
299308
}
309+
310+
if (version_compare($ocVersionFromBeforeUpdate, '28.0.0.8', '<') && $this->introduceEmlAndMsgFormatType()) {
311+
$out->info('Fixed eml and msg mime type');
312+
}
300313
}
301314
}

resources/config/mimetypemapping.dist.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"dotx": ["application/vnd.openxmlformats-officedocument.wordprocessingml.template"],
5454
"dv": ["video/dv"],
5555
"emf": ["image/emf"],
56+
"eml": ["message/rfc822", "text/plain"],
5657
"eot": ["application/vnd.ms-fontobject"],
5758
"eps": ["application/postscript"],
5859
"epub": ["application/epub+zip"],
@@ -122,6 +123,7 @@
122123
"mpeg": ["video/mpeg"],
123124
"mpg": ["video/mpeg"],
124125
"mpo": ["image/jpeg"],
126+
"msg": ["application/vnd.ms-outlook"],
125127
"msi": ["application/x-msi"],
126128
"mt2s": ["video/MP2T"],
127129
"mts": ["video/MP2T"],

version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patch level
3131
// when updating major/minor version number.
3232

33-
$OC_Version = [28, 0, 0, 7];
33+
$OC_Version = [28, 0, 0, 8];
3434

3535
// The human-readable string
3636
$OC_VersionString = '28.0.0 RC1';

0 commit comments

Comments
 (0)