diff options
-rw-r--r-- | USAGE | 3 | ||||
-rw-r--r-- | main.go | 12 |
2 files changed, 12 insertions, 3 deletions
@@ -66,7 +66,7 @@ Running --forbid-ext EXTS forbids file extensions contained in the comma-separated list EXTS - example: --forbid-ext exe,dll,src + example: --forbid-ext exe,dll,scr --forbid-mime TYPES forbids MIME types contained in the comma-separated list TYPES @@ -86,6 +86,7 @@ Running --upload-url URL uses URL as the prefix for address of uploaded files + if missing, uses --upload-host, --https or --http to construct the URL example: --upload-url http://u.example.com/ --grill @@ -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/" + } } } |