mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-05 17:03:15 +03:00
added svg, file size limit
Added svg to logo choices, file size limits (5Mb for favicon, 10Mb for logo)
This commit is contained in:
parent
12d0dc6288
commit
830d5a1c59
2 changed files with 32 additions and 8 deletions
|
@ -52,7 +52,12 @@ func Favicon(db store.IStore) echo.HandlerFunc {
|
|||
func BrandLogo(db store.IStore) echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
|
||||
_, err := os.OpenFile(path.Join(db.GetPath(), "branding")+"/logo.png", os.O_RDONLY, 0777)
|
||||
_, err := os.OpenFile(path.Join(db.GetPath(), "branding")+"/logo.svg", os.O_RDONLY, 0777)
|
||||
if err == nil {
|
||||
return c.File(path.Join(db.GetPath(), "branding") + "/logo.svg")
|
||||
}
|
||||
|
||||
_, err = os.OpenFile(path.Join(db.GetPath(), "branding")+"/logo.png", os.O_RDONLY, 0777)
|
||||
if err == nil {
|
||||
return c.File(path.Join(db.GetPath(), "branding") + "/logo.png")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue