Ver código fonte

feat: add docxf and form mimetypes

signed-off-by: Luka Trovic <luka@nextcloud.com>
tags/v25.0.0beta1
Luka Trovic 2 anos atrás
pai
commit
0858d3d514
Nenhuma conta vinculada ao e-mail do autor do commit

+ 4
- 1
core/js/mimetypelist.js Ver arquivo

@@ -110,7 +110,10 @@ OC.MimeTypeList={
"application/internet-shortcut": "link",
"application/km": "mindmap",
"application/x-freemind": "mindmap",
"application/vnd.xmind.workbook": "mindmap"
"application/vnd.xmind.workbook": "mindmap",
"image/targa": "image/tga",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document.oform": "x-office/form",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxf": "x-office/form-template"
},
files: [
"application",

+ 13
- 0
lib/private/Repair/RepairMimeTypes.php Ver arquivo

@@ -211,6 +211,15 @@ class RepairMimeTypes implements IRepairStep {
return $this->updateMimetypes($updatedMimetypes);
}

private function introduceOnlyofficeFormType() {
$updatedMimetypes = [
"oform" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document.oform",
"docxf" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxf",
];

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


/**
* Fix mime types
@@ -260,5 +269,9 @@ class RepairMimeTypes implements IRepairStep {
if (version_compare($ocVersionFromBeforeUpdate, '23.0.0.2', '<') && $this->introduceFlatOpenDocumentType()) {
$out->info('Fixed Flat OpenDocument mime types');
}

if (version_compare($ocVersionFromBeforeUpdate, '25.0.0.2', '<') && $this->introduceOnlyofficeFormType()) {
$out->info('Fixed ONLYOFFICE Forms OpenXML mime types');
}
}
}

+ 3
- 1
resources/config/mimetypealiases.dist.json Ver arquivo

@@ -111,6 +111,8 @@
"application/km": "mindmap",
"application/x-freemind": "mindmap",
"application/vnd.xmind.workbook": "mindmap",
"image/targa": "image/tga"
"image/targa": "image/tga",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document.oform": "x-office/form",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxf": "x-office/form-template"
}


+ 1
- 1
version.php Ver arquivo

@@ -30,7 +30,7 @@
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
// when updating major/minor version number.

$OC_Version = [25, 0, 0, 1];
$OC_Version = [25, 0, 0, 2];

// The human readable string
$OC_VersionString = '25.0.0 dev';

Carregando…
Cancelar
Salvar