Fixed nil pointer when failing to upload an oversized image
Этот коммит содержится в:
@@ -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())
|
c.Err = model.NewAppError("uploadFile", "Unable to upload image file.", err.Error())
|
||||||
return
|
return
|
||||||
} else if config.Width*config.Height > MaxImageSize {
|
} 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
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user