aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--USAGE3
-rw-r--r--main.go12
2 files changed, 12 insertions, 3 deletions
diff --git a/USAGE b/USAGE
index 3cd76a4..fb742fc 100644
--- a/USAGE
+++ b/USAGE
@@ -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
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/"
+ }
}
}