mirror of
https://github.com/Luzifer/share.git
synced 2024-12-21 02:51:17 +00:00
Fix: Links work better without spaces
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
9307397d27
commit
551fd3f50e
1 changed files with 2 additions and 0 deletions
2
main.go
2
main.go
|
@ -11,6 +11,7 @@ import (
|
||||||
"mime"
|
"mime"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"github.com/Luzifer/rconfig"
|
"github.com/Luzifer/rconfig"
|
||||||
|
@ -80,6 +81,7 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func calculateUploadFilename(inFile string) (string, error) {
|
func calculateUploadFilename(inFile string) (string, error) {
|
||||||
|
inFile = strings.Replace(inFile, " ", "_", -1)
|
||||||
upFile := path.Join(cfg.BasePath, path.Base(inFile))
|
upFile := path.Join(cfg.BasePath, path.Base(inFile))
|
||||||
|
|
||||||
fileHash, err := hashFile(inFile)
|
fileHash, err := hashFile(inFile)
|
||||||
|
|
Loading…
Reference in a new issue