From 95c3546f26bb459c23c8418cd717bace88b67e24 Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Tue, 12 Oct 2021 13:14:31 +0200 Subject: [PATCH] Adapted mime types example config to new format (cf. #2138) (#2147) --- changelog/unreleased/mimetypes-conf.md | 4 ++++ examples/storage-references/gateway.toml | 22 ++++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 changelog/unreleased/mimetypes-conf.md diff --git a/changelog/unreleased/mimetypes-conf.md b/changelog/unreleased/mimetypes-conf.md new file mode 100644 index 0000000000..418445c713 --- /dev/null +++ b/changelog/unreleased/mimetypes-conf.md @@ -0,0 +1,4 @@ +Bugfix: Follow up of #2138: this is the new expected format +for the mime types configuration for the AppRegistry. + +https://github.com/cs3org/reva/pull/2147 diff --git a/examples/storage-references/gateway.toml b/examples/storage-references/gateway.toml index 9185c95d67..0031856e2c 100644 --- a/examples/storage-references/gateway.toml +++ b/examples/storage-references/gateway.toml @@ -31,16 +31,18 @@ appauth = "localhost:15000" [grpc.services.ocmproviderauthorizer] [grpc.services.appregistry] -[grpc.services.appregistry.drivers.static.mime_types] -"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = {"extension" = "docx", "name" = "Microsoft Word", "description" = "Microsoft Word document"} -"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" = {"extension" = "xlsx", "name" = "Microsoft Excel", "description" = "Microsoft Excel document"} -"application/vnd.openxmlformats-officedocument.presentationml.presentation" = {"extension" = "pptx", "name" = "Microsoft PowerPoint", "description" = "Microsoft PowerPoint document"} -"application/vnd.oasis.opendocument.text" = {"extension" = "odt", "name" = "OpenDocument", "description" = "OpenDocument text document"} -"application/vnd.oasis.opendocument.spreadsheet" = {"extension" = "ods", "name" = "OpenSpreadsheet", "description" = "OpenDocument spreadsheet document"} -"application/vnd.oasis.opendocument.presentation" = {"extension" = "odp", "name" = "OpenPresentation", "description" = "OpenDocument presentation document"} -"text/plain" = {"extension" = "txt", "name" = "Text file", "description" = "Text file"} -"text/markdown" = {"extension" = "md", "name" = "Markdown file", "description" = "Markdown file"} -"application/vnd.jupyter" = {"extension" = "ipynb", "name" = "Jupyter Notebook", "description" = "Jupyter Notebook"} +[grpc.services.appregistry.drivers.static] +mime_types = [ + {"mime_type" = "text/plain", "extension" = "txt", "name" = "Text file", "description" = "Text file", "allow_creation" = true}, + {"mime_type" = "text/markdown", "extension" = "md", "name" = "Markdown file", "description" = "Markdown file", "allow_creation" = true}, + {"mime_type" = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "extension" = "docx", "name" = "Microsoft Word", "description" = "Microsoft Word document", "allow_creation" = true}, + {"mime_type" = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "extension" = "xlsx", "name" = "Microsoft Excel", "description" = "Microsoft Excel document", "allow_creation" = true}, + {"mime_type" = "application/vnd.openxmlformats-officedocument.presentationml.presentation", "extension" = "pptx", "name" = "Microsoft PowerPoint", "description" = "Microsoft PowerPoint document", "allow_creation" = true}, + {"mime_type" = "application/vnd.oasis.opendocument.text", "extension" = "odt", "name" = "OpenDocument", "description" = "OpenDocument text document", "allow_creation" = true}, + {"mime_type" = "application/vnd.oasis.opendocument.spreadsheet", "extension" = "ods", "name" = "OpenSpreadsheet", "description" = "OpenDocument spreadsheet document", "allow_creation" = true}, + {"mime_type" = "application/vnd.oasis.opendocument.presentation", "extension" = "odp", "name" = "OpenPresentation", "description" = "OpenDocument presentation document", "allow_creation" = true}, + {"mime_type" = "application/vnd.jupyter", "extension" = "ipynb", "name" = "Jupyter Notebook", "description" = "Jupyter Notebook"} +] [grpc.services.appprovider] mime_types = ["text/plain"]