1
0
Fork 0
mirror of https://github.com/Luzifer/share.git synced 2024-12-29 23:11:18 +00:00

Fix: Links work better without spaces

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2017-12-28 16:59:53 +01:00
parent 9307397d27
commit 551fd3f50e
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -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)