summaryrefslogtreecommitdiffstats
path: root/api/file.go
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-06-15 11:51:10 -0400
committerJoramWilander <jwawilander@gmail.com>2015-06-15 11:51:10 -0400
commitadceb8c929b57d8c320b9b39167fb25f04ca99a1 (patch)
tree4efc0aa9949575c1bc4a64e54afae09412848406 /api/file.go
parentb7a821c3410ecd165241e2dbcf2c8376ae402124 (diff)
downloadchat-adceb8c929b57d8c320b9b39167fb25f04ca99a1.tar.gz
chat-adceb8c929b57d8c320b9b39167fb25f04ca99a1.tar.bz2
chat-adceb8c929b57d8c320b9b39167fb25f04ca99a1.zip
fixes mm-1245 filenames are now url escaped
Diffstat (limited to 'api/file.go')
-rw-r--r--api/file.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/file.go b/api/file.go
index c7c3b7b3e..10167c6ff 100644
--- a/api/file.go
+++ b/api/file.go
@@ -114,7 +114,7 @@ func uploadFile(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
- fileUrl := c.TeamUrl + "/api/v1/files/get/" + channelId + "/" + c.Session.UserId + "/" + uid + "/" + files[i].Filename
+ fileUrl := c.TeamUrl + "/api/v1/files/get/" + channelId + "/" + c.Session.UserId + "/" + uid + "/" + url.QueryEscape(files[i].Filename)
resStruct.Filenames = append(resStruct.Filenames, fileUrl)
}