From ded935d1a1efcce8d1848a2d1d6ca0719247be9a Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Thu, 7 Nov 2024 11:16:13 +0100 Subject: [PATCH] fix: fix app templates --- changelog/unreleased/fix-app-templates.md | 5 +++++ internal/http/services/appprovider/templates.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/fix-app-templates.md diff --git a/changelog/unreleased/fix-app-templates.md b/changelog/unreleased/fix-app-templates.md new file mode 100644 index 0000000000..a243e792bb --- /dev/null +++ b/changelog/unreleased/fix-app-templates.md @@ -0,0 +1,5 @@ +Bugfix: Fix app templates + +We fixed the app templates by using the product name of the providerinfo instead of the provider name. + +https://github.com/cs3org/reva/pull/4918 diff --git a/internal/http/services/appprovider/templates.go b/internal/http/services/appprovider/templates.go index 0491a06a34..fc1a595542 100644 --- a/internal/http/services/appprovider/templates.go +++ b/internal/http/services/appprovider/templates.go @@ -75,7 +75,7 @@ var tl = TemplateList{ func addTemplateInfo(mt *appregistry.MimeTypeInfo, apps []*ProviderInfo) { for _, app := range apps { - if tls, ok := tl.Templates[strings.ToLower(app.Name)]; ok { + if tls, ok := tl.Templates[strings.ToLower(app.ProductName)]; ok { for _, tmpl := range tls { if tmpl.Extension != "" && tmpl.Extension == mt.Ext { app.TargetExt = tmpl.TargetExtension