fix: fix static assets url generation (#965)

This commit is contained in:
Oleg Lobanov committed 2020-05-31 22:26:10 +02:00
1 parent 6e5405eeed
commit ba47e3b2fe
5 files changed
+13 -13

No files matched your search

+2 -1
View File
@@ -4,6 +4,7 @@ import (
"crypto/rand"
"encoding/base64"
"net/http"
"path"
"strconv"
"strings"
"time"
@@ -56,7 +57,7 @@ var sharePostHandler = withPermShare(func(w http.ResponseWriter, r *http.Request
var err error
s, err = d.store.Share.GetPermanent(r.URL.Path, d.user.ID)
if err == nil {
w.Write([]byte(d.server.BaseURL + "/share/" + s.Hash))
w.Write([]byte(path.Join(d.server.BaseURL, "/share/", s.Hash)))
return 0, nil
}
}