Skip to content

Commit

Permalink
Merge pull request #41868 from nextcloud/mime-type-msg-eml-28
Browse files Browse the repository at this point in the history
[stable28] fix: add mimetype for eml and msg
  • Loading branch information
ChristophWurst authored Nov 29, 2023
2 parents 1b8e30d + 1081c4a commit 64c7221
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
13 changes: 13 additions & 0 deletions lib/private/Repair/RepairMimeTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,15 @@ private function introduceEnhancedMetafileFormatType() {
return $this->updateMimetypes($updatedMimetypes);
}

private function introduceEmlAndMsgFormatType() {
$updatedMimetypes = [
'eml' => 'message/rfc822',
'msg' => 'application/vnd.ms-outlook',
];

return $this->updateMimetypes($updatedMimetypes);
}

/**
* Fix mime types
*/
Expand Down Expand Up @@ -297,5 +306,9 @@ public function run(IOutput $out) {
if (version_compare($ocVersionFromBeforeUpdate, '28.0.0.5', '<') && $this->introduceEnhancedMetafileFormatType()) {
$out->info('Fixed Enhanced Metafile Format mime types');
}

if (version_compare($ocVersionFromBeforeUpdate, '28.0.0.8', '<') && $this->introduceEmlAndMsgFormatType()) {
$out->info('Fixed eml and msg mime type');
}
}
}
2 changes: 2 additions & 0 deletions resources/config/mimetypemapping.dist.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down Expand Up @@ -122,6 +123,7 @@
"mpeg": ["video/mpeg"],
"mpg": ["video/mpeg"],
"mpo": ["image/jpeg"],
"msg": ["application/vnd.ms-outlook"],
"msi": ["application/x-msi"],
"mt2s": ["video/MP2T"],
"mts": ["video/MP2T"],
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [28, 0, 0, 7];
$OC_Version = [28, 0, 0, 8];

// The human-readable string
$OC_VersionString = '28.0.0 RC1';
Expand Down

0 comments on commit 64c7221

Please sign in to comment.