mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-08 04:20:59 -05:00
Merge pull request #235 from opencloud-eu/fix-logo-upload
fix(web): logo upload
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user