Merge pull request #1231 from hmhealey/plt798

PLT-798 Fixed nil pointer when failing to upload an oversized image
This commit is contained in:
Joram Wilander
2015-10-29 12:43:42 -04:00

View File

@@ -137,7 +137,7 @@ func uploadFile(c *Context, w http.ResponseWriter, r *http.Request) {
c.Err = model.NewAppError("uploadFile", "Unable to upload image file.", err.Error())
return
} else if config.Width*config.Height > MaxImageSize {
c.Err = model.NewAppError("uploadFile", "Unable to upload image file. File is too large.", err.Error())
c.Err = model.NewAppError("uploadFile", "Unable to upload image file. File is too large.", "File exceeds max image size.")
return
}
}