From 629fcd4f297ffb34b4f3b54326645eabd42ab32c Mon Sep 17 00:00:00 2001 From: clsr Date: Thu, 16 Jun 2016 20:05:39 +0200 Subject: Improve automatic generation of upload URL --- main.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index ad8711c..d795cb6 100644 --- a/main.go +++ b/main.go @@ -71,9 +71,17 @@ func main() { if uploadUrl == "" { if *listenHttps != "" { - uploadUrl = "https://" + *listenHttps + "/u/" + if uploadHost != "" { + uploadUrl = "https://" + uploadHost + "/" + } else { + uploadUrl = "https://" + *listenHttps + "/u/" + } } else if *listenHttp != "" { - uploadUrl = "http://" + *listenHttp + "/u/" + if uploadHost != "" { + uploadUrl = "http://" + uploadHost + "/" + } else { + uploadUrl = "http://" + *listenHttp + "/u/" + } } } -- cgit