mirror of
https://github.com/Luzifer/share.git
synced 2024-12-20 18:41: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"
|
||||
"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)
|
||||
|
|
Loading…
Reference in a new issue