From 9f3b9589c74d59456829652a08267e734f46bd55 Mon Sep 17 00:00:00 2001 From: Peter Sanchez Date: Mon, 17 Oct 2022 10:43:28 -0600 Subject: [PATCH] Adding MediaURL to config --- config/config.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/config.go b/config/config.go index 08ea7d9..fa07864 100644 --- a/config/config.go +++ b/config/config.go @@ -22,6 +22,7 @@ type Config struct { EmailSvc string StorageSvc string + MediaURL string AdminEmail string EmailAdminErrors bool @@ -55,6 +56,7 @@ func LoadConfig(fname string) (*Config, error) { Timeout: 30, EmailSvc: "console", StorageSvc: "fs", + MediaURL: "/static/", AdminEmail: "admin@localhost", EmailAdminErrors: true, DefaultFromEmail: "gobwebs@localhost", @@ -109,6 +111,9 @@ func LoadConfig(fname string) (*Config, error) { } } + if val, ok := file.Get("gobwebs", "media-url"); ok { + conf.MediaURL = val + } if val, ok := file.Get("gobwebs", "admin-email"); ok { conf.AdminEmail = val } -- 2.45.2