diff options
author | Benjamin Giesinger <benjamin.giesinger@pm.me> | 2025-03-25 18:15:26 +0100 |
---|---|---|
committer | Benjamin Giesinger <benjamin.giesinger@pm.me> | 2025-03-25 19:50:06 +0100 |
commit | 68d45006cd8a94193c3b251c42c475804c459331 (patch) | |
tree | eea9264bf07e1e074ca7087d28d4b91771e18ec2 | |
parent | 652b0cc9ab8672928e9d728c35016e4657b62f90 (diff) | |
download | nextcloud-server-68d45006cd8a94193c3b251c42c475804c459331.tar.gz nextcloud-server-68d45006cd8a94193c3b251c42c475804c459331.zip |
feat(mimetypes): Added musicxml mimetypes
-rw-r--r-- | lib/private/Repair/RepairMimeTypes.php | 18 | ||||
-rw-r--r-- | resources/config/mimetypemapping.dist.json | 2 |
2 files changed, 20 insertions, 0 deletions
diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php index 715f7623440..83a7d648a2f 100644 --- a/lib/private/Repair/RepairMimeTypes.php +++ b/lib/private/Repair/RepairMimeTypes.php @@ -338,6 +338,20 @@ class RepairMimeTypes implements IRepairStep { } /** + * @throws Exception + * @since 32.0.0 + */ + private function introduceMusicxmlType(): IResult|int|null { + 'mxl' => 'application/vnd.recordare.musicxml', + 'musicxml' => 'application/vnd.recordare.musicxml+xml', + ]; + + return $this->updateMimetypes($updatedMimetypes); + } + + + + /** * Check if there are any migrations available * * @throws Exception @@ -447,6 +461,10 @@ class RepairMimeTypes implements IRepairStep { $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 7a4cc245b98..1227741769d 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"], |