diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php index 715f7623440d7..28b22ec3f20b4 100644 --- a/lib/private/Repair/RepairMimeTypes.php +++ b/lib/private/Repair/RepairMimeTypes.php @@ -337,6 +337,21 @@ private function introduceZstType(): IResult|int|null { return $this->updateMimetypes($updatedMimetypes); } + /** + * @throws Exception + * @since 32.0.0 + */ + private function introduceMusicxmlType(): IResult|int|null { + $updatedMimetypes = [ + 'mxl' => 'application/vnd.recordare.musicxml', + 'musicxml' => 'application/vnd.recordare.musicxml+xml', + ]; + + return $this->updateMimetypes($updatedMimetypes); + } + + + /** * Check if there are any migrations available * @@ -447,6 +462,10 @@ public function run(IOutput $out): void { $out->info('Fixed zst mime type'); } + if (version_compare($mimeTypeVersion, '32.0.0.0', '<') && $this->introduceMusicxmlType()) { + $out->info('Fixed musicxml mime type'); + } + if (!$this->dryRun) { $this->appConfig->setValueString('files', 'mimetype_version', $serverVersion); } diff --git a/resources/config/mimetypemapping.dist.json b/resources/config/mimetypemapping.dist.json index 7a4cc245b98b4..1227741769d0c 100644 --- a/resources/config/mimetypemapping.dist.json +++ b/resources/config/mimetypemapping.dist.json @@ -129,6 +129,8 @@ "msi": ["application/x-msi"], "mt2s": ["video/MP2T"], "mts": ["video/MP2T"], + "musicxml": ["application/vnd.recordare.musicxml+xml"], + "mxl": ["application/vnd.recordare.musicxml"], "nef": ["image/x-dcraw"], "nfo": ["text/x-nfo"], "numbers": ["application/x-iwork-numbers-sffnumbers"],