summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorAsaad Mahmood <Unknowngi@live.com>2015-10-12 23:36:24 +0500
committerAsaad Mahmood <Unknowngi@live.com>2015-10-12 23:36:24 +0500
commit893a72141bcab38c8a5a10ec920c9480120d6b51 (patch)
tree58a63db7918abd24f3a5839da39568ac54b2c9c5 /api
parent7bb8f5d1ef47e02c4f1784656f6abcff409b96d5 (diff)
parent246d934e5e557555645a1d26ae005be452ecbd2d (diff)
downloadchat-893a72141bcab38c8a5a10ec920c9480120d6b51.tar.gz
chat-893a72141bcab38c8a5a10ec920c9480120d6b51.tar.bz2
chat-893a72141bcab38c8a5a10ec920c9480120d6b51.zip
Merge branch 'master' of https://github.com/mattermost/platform into ui-fixes
Diffstat (limited to 'api')
-rw-r--r--api/file.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/file.go b/api/file.go
index 9ebcd821b..429347596 100644
--- a/api/file.go
+++ b/api/file.go
@@ -408,11 +408,11 @@ func getFile(c *Context, w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Length", strconv.Itoa(len(f)))
w.Header().Del("Content-Type") // Content-Type will be set automatically by the http writer
- // attach extra headers to trigger a download on IE and Edge
+ // attach extra headers to trigger a download on IE, Edge, and Safari
ua := user_agent.New(r.UserAgent())
bname, _ := ua.Browser()
- if bname == "Edge" || bname == "Internet Explorer" {
+ if bname == "Edge" || bname == "Internet Explorer" || bname == "Safari" {
// trim off anything before the final / so we just get the file's name
parts := strings.Split(filename, "/")