fix(download): use path instead of filepath
build / Go-Build (push) Successful in 1m26s

This commit is contained in:
2026-05-26 02:05:26 +02:00
parent 75ebe4ec70
commit 9097d4257d
+3 -3
View File
@@ -5,7 +5,7 @@ import (
"log"
"net/http"
"net/url"
"path/filepath"
"path"
"strconv"
"tomatentum.net/svg-templater/pkg/format"
@@ -92,10 +92,10 @@ func DownloadSVG(w http.ResponseWriter, r *http.Request) {
w.Write(json)
}
func getPublicUrl(r *http.Request, path string) string {
func getPublicUrl(r *http.Request, subpath string) string {
newURL := url.URL{
Host: r.Host,
Path: filepath.Join("public", path),
Path: path.Join("public", subpath),
}
newURL.Scheme = "http"
if r.TLS != nil {