From e5a019390d91890bd098511f4845e27ff7bda430 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Fri, 9 Oct 2015 16:45:40 -0400 Subject: Fixed download links in Safari --- api/file.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'api/file.go') 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, "/") -- cgit v1.2.3-1-g7c22