mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Merge pull request #1231 from hmhealey/plt798
PLT-798 Fixed nil pointer when failing to upload an oversized image
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user