diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-07-27 12:43:40 -0400 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-07-28 10:07:11 -0400 |
commit | d8e9b7c8e4d9450995855a22005a82541f67a500 (patch) | |
tree | 737d65b86507de54818a412a2232c1d704896761 | |
parent | fbb2477643f4043ef2b5827cd14402b9cdeb7241 (diff) | |
download | chat-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
-rw-r--r-- | api/file.go | 2 |
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") } |