summaryrefslogtreecommitdiffstats
path: root/app/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/file.go')
-rw-r--r--app/file.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/file.go b/app/file.go
index 832ff77d4..36a23e3d8 100644
--- a/app/file.go
+++ b/app/file.go
@@ -309,8 +309,7 @@ func (a *App) DoUploadFile(now time.Time, teamId string, channelId string, userI
if info.IsImage() {
// Check dimensions before loading the whole thing into memory later on
if info.Width*info.Height > MaxImageSize {
- err := model.NewLocAppError("uploadFile", "api.file.upload_file.large_image.app_error", map[string]interface{}{"Filename": filename}, "")
- err.StatusCode = http.StatusBadRequest
+ err := model.NewAppError("uploadFile", "api.file.upload_file.large_image.app_error", map[string]interface{}{"Filename": filename}, "", http.StatusBadRequest)
return nil, err
}