From 551fd3f50e5a1eb2b203794c6ea362089f1dc79b Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 28 Dec 2017 16:59:53 +0100 Subject: [PATCH] Fix: Links work better without spaces Signed-off-by: Knut Ahlers --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index 6e5f664..2045592 100644 --- a/main.go +++ b/main.go @@ -11,6 +11,7 @@ import ( "mime" "os" "path" + "strings" "text/template" "github.com/Luzifer/rconfig" @@ -80,6 +81,7 @@ func main() { } func calculateUploadFilename(inFile string) (string, error) { + inFile = strings.Replace(inFile, " ", "_", -1) upFile := path.Join(cfg.BasePath, path.Base(inFile)) fileHash, err := hashFile(inFile)