summaryrefslogtreecommitdiffstats
path: root/api/file.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-06-15 10:02:11 -0800
committerCorey Hulen <corey@hulen.com>2015-06-15 10:02:11 -0800
commitc7bdb8acdb716832c7e5cdd25648b9f72ae1f748 (patch)
treeaf7006b260cd44ea1bc1779439ea005563dcc1f0 /api/file.go
parent4335b21ee9cd41ff5693ab9c7aac957a799a3dfa (diff)
parent706bba193d65b4d25974a36e434eda50b852290a (diff)
downloadchat-c7bdb8acdb716832c7e5cdd25648b9f72ae1f748.tar.gz
chat-c7bdb8acdb716832c7e5cdd25648b9f72ae1f748.tar.bz2
chat-c7bdb8acdb716832c7e5cdd25648b9f72ae1f748.zip
Merge pull request #4 from mattermost/mm-1245
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)
}