Migrate to idiomatic error handling app/a*.go and app/b*.go (#9455)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
3785ad48c1
Коммит
7636650a25
@@ -36,7 +36,9 @@ func (a *App) SaveBrandImage(imageData *multipart.FileHeader) *model.AppError {
|
||||
config, _, err := image.DecodeConfig(file)
|
||||
if err != nil {
|
||||
return model.NewAppError("SaveBrandImage", "brand.save_brand_image.decode_config.app_error", nil, err.Error(), http.StatusBadRequest)
|
||||
} else if config.Width*config.Height > model.MaxImageSize {
|
||||
}
|
||||
|
||||
if config.Width*config.Height > model.MaxImageSize {
|
||||
return model.NewAppError("SaveBrandImage", "brand.save_brand_image.too_large.app_error", nil, err.Error(), http.StatusBadRequest)
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user