Merge pull request #235 from opencloud-eu/fix-logo-upload

fix(web): logo upload
This commit is contained in:
Viktor Scharf
2025-02-24 11:21:06 +01:00
committed by GitHub
+4 -6
View File
@@ -144,9 +144,8 @@ func (s Service) LogoUpload(w http.ResponseWriter, r *http.Request) {
} }
err = UpdateKV(s.themeFS, filepathx.JailJoin(_brandingRoot, _themeFileName), KV{ err = UpdateKV(s.themeFS, filepathx.JailJoin(_brandingRoot, _themeFileName), KV{
"common.logo": filepathx.JailJoin("themes", fp), "common.logo": filepathx.JailJoin("themes", fp),
"clients.web.defaults.logo.topbar": filepathx.JailJoin("themes", fp), "clients.web.defaults.logo": filepathx.JailJoin("themes", fp),
"clients.web.defaults.logo.login": filepathx.JailJoin("themes", fp),
}) })
if err != nil { if err != nil {
w.WriteHeader(http.StatusInternalServerError) w.WriteHeader(http.StatusInternalServerError)
@@ -184,9 +183,8 @@ func (s Service) LogoReset(w http.ResponseWriter, r *http.Request) {
} }
err = UpdateKV(s.themeFS, filepathx.JailJoin(_brandingRoot, _themeFileName), KV{ err = UpdateKV(s.themeFS, filepathx.JailJoin(_brandingRoot, _themeFileName), KV{
"common.logo": nil, "common.logo": nil,
"clients.web.defaults.logo.topbar": nil, "clients.web.defaults.logo": nil,
"clients.web.defaults.logo.login": nil,
}) })
if err != nil { if err != nil {
w.WriteHeader(http.StatusInternalServerError) w.WriteHeader(http.StatusInternalServerError)