Add text/asciidoc mimetype

Ref https://docs.asciidoctor.org/asciidoc/latest/faq/#whats-the-media-type-aka-mime-type-for-asciidoc

This is step 1 towards allowing editing of AsciiDoc files in Nextcloud.
Step 2 is adding support in https://github.com/nextcloud/text.

Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
pull/35176/head
Bjørn Forsman 2 years ago
parent baf74f0aa1
commit 582f07c8fc

@ -106,6 +106,15 @@ class RepairMimeTypes implements IRepairStep {
return $count;
}
private function introduceAsciidocType() {
$updatedMimetypes = [
'adoc' => 'text/asciidoc',
'asciidoc' => 'text/asciidoc',
];
return $this->updateMimetypes($updatedMimetypes);
}
private function introduceImageTypes() {
$updatedMimetypes = [
'jp2' => 'image/jp2',
@ -273,5 +282,9 @@ class RepairMimeTypes implements IRepairStep {
if (version_compare($ocVersionFromBeforeUpdate, '25.0.0.2', '<') && $this->introduceOnlyofficeFormType()) {
$out->info('Fixed ONLYOFFICE Forms OpenXML mime types');
}
if (version_compare($ocVersionFromBeforeUpdate, '26.0.0.1', '<') && $this->introduceAsciidocType()) {
$out->info('Fixed AsciiDoc mime types');
}
}
}

@ -10,9 +10,11 @@
"3gp": ["video/3gpp"],
"7z": ["application/x-7z-compressed"],
"accdb": ["application/msaccess"],
"adoc": ["text/asciidoc", "text/plain"],
"ai": ["application/illustrator"],
"apk": ["application/vnd.android.package-archive"],
"arw": ["image/x-dcraw"],
"asciidoc": ["text/asciidoc", "text/plain"],
"avi": ["video/x-msvideo"],
"bash": ["text/x-shellscript"],
"bat": ["application/x-msdos-program"],

Loading…
Cancel
Save