summaryrefslogtreecommitdiffstats
path: root/api/file.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2018-02-12 18:36:39 -0600
committerGitHub <noreply@github.com>2018-02-12 18:36:39 -0600
commitfbef16f8630f74248157c2cd9e546ece355c869a (patch)
tree95feb1a0b94f43fd38533adc508df2daf823ea86 /api/file.go
parent56f49cf4860cfca51e852ec3e7d9df772d2b2060 (diff)
parent32c1f7be239ddb19d6c59b114d9ae1a543f8ba9c (diff)
downloadchat-fbef16f8630f74248157c2cd9e546ece355c869a.tar.gz
chat-fbef16f8630f74248157c2cd9e546ece355c869a.tar.bz2
chat-fbef16f8630f74248157c2cd9e546ece355c869a.zip
Merge branch 'release-4.7' into rm-willnorris-proxy-support
Diffstat (limited to 'api/file.go')
-rw-r--r--api/file.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/file.go b/api/file.go
index 3b8984816..2d626304e 100644
--- a/api/file.go
+++ b/api/file.go
@@ -174,12 +174,12 @@ func getPublicFile(c *Context, w http.ResponseWriter, r *http.Request) {
if hash != correctHash {
c.Err = model.NewAppError("getPublicFile", "api.file.get_file.public_invalid.app_error", nil, "", http.StatusBadRequest)
- utils.RenderWebAppError(w, r, c.Err, c.App.AsymmetricSigningKey())
+ http.Redirect(w, r, c.GetSiteURLHeader()+"/error?message="+utils.T(c.Err.Message), http.StatusTemporaryRedirect)
return
}
} else {
c.Err = model.NewAppError("getPublicFile", "api.file.get_file.public_invalid.app_error", nil, "", http.StatusBadRequest)
- utils.RenderWebAppError(w, r, c.Err, c.App.AsymmetricSigningKey())
+ http.Redirect(w, r, c.GetSiteURLHeader()+"/error?message="+utils.T(c.Err.Message), http.StatusTemporaryRedirect)
return
}