repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
10b01d4
parent
4dd9d7f
author
Eric Bower
date
2023-08-04 19:27:55 +0000 UTC
fix: upload url
1 files changed,  +2, -2
M filehandlers/assets/handler.go
+2, -2
 1@@ -24,7 +24,7 @@ func getAssetURL(c *shared.ConfigSite, username, projectName, dir, slug string)
 2 	fname := url.PathEscape(strings.TrimLeft(slug, "/"))
 3 	fdir := strings.TrimLeft(dir, "/")
 4 	return fmt.Sprintf(
 5-		"%s://%s-%s.%s/%s/%s",
 6+		"%s://%s-%s.%s/%s%s",
 7 		c.Protocol,
 8 		username,
 9 		projectName,
10@@ -212,7 +212,7 @@ func (h *UploadAssetHandler) Write(s ssh.Session, entry *utils.FileEntry) (strin
11 		h.Cfg,
12 		user.Name,
13 		projectName,
14-		filepath.Dir(strings.Replace(data.Filepath, "/"+projectName, "", 1)),
15+		filepath.Dir(strings.Replace(data.Filepath, projectName, "", 1)),
16 		filepath.Base(data.Filepath),
17 	)
18