From f5837c1b64994a15537a0b8df109bed504d0d20a Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Tue, 21 Jul 2015 16:15:24 -0400 Subject: Old files are saved with full paths, this changes so that new files are not saved with absolute paths and detects old files saved and fixes them. --- api/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api') diff --git a/api/file.go b/api/file.go index 362cdf896..5d676b9fd 100644 --- a/api/file.go +++ b/api/file.go @@ -115,7 +115,7 @@ func uploadFile(c *Context, w http.ResponseWriter, r *http.Request) { return } - fileUrl := c.GetSiteURL() + "/api/v1/files/get/" + channelId + "/" + c.Session.UserId + "/" + uid + "/" + url.QueryEscape(files[i].Filename) + fileUrl := "/" + channelId + "/" + c.Session.UserId + "/" + uid + "/" + url.QueryEscape(files[i].Filename) resStruct.Filenames = append(resStruct.Filenames, fileUrl) } -- cgit v1.2.3-1-g7c22