summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-07-27 12:43:40 -0400
committerhmhealey <harrisonmhealey@gmail.com>2015-07-28 10:07:11 -0400
commitd8e9b7c8e4d9450995855a22005a82541f67a500 (patch)
tree737d65b86507de54818a412a2232c1d704896761 /api
parentfbb2477643f4043ef2b5827cd14402b9cdeb7241 (diff)
downloadchat-d8e9b7c8e4d9450995855a22005a82541f67a500.tar.gz
chat-d8e9b7c8e4d9450995855a22005a82541f67a500.tar.bz2
chat-d8e9b7c8e4d9450995855a22005a82541f67a500.zip
Allow users to download file attachments with names that don't include a file extension
Diffstat (limited to 'api')
-rw-r--r--api/file.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/file.go b/api/file.go
index 889c9dd1b..3ef50fbbd 100644
--- a/api/file.go
+++ b/api/file.go
@@ -33,7 +33,7 @@ func InitFile(r *mux.Router) {
sr := r.PathPrefix("/files").Subrouter()
sr.Handle("/upload", ApiUserRequired(uploadFile)).Methods("POST")
- sr.Handle("/get/{channel_id:[A-Za-z0-9]+}/{user_id:[A-Za-z0-9]+}/{filename:([A-Za-z0-9]+/)?.+\\.[A-Za-z0-9]{3,}}", ApiAppHandler(getFile)).Methods("GET")
+ sr.Handle("/get/{channel_id:[A-Za-z0-9]+}/{user_id:[A-Za-z0-9]+}/{filename:([A-Za-z0-9]+/)?.+(\\.[A-Za-z0-9]{3,})?}", ApiAppHandler(getFile)).Methods("GET")
sr.Handle("/get_public_link", ApiUserRequired(getPublicLink)).Methods("POST")
}