Add MaxImageResolution config setting (#17941)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e1b0644b0d
Коммит
96593580ae
@@ -265,7 +265,7 @@ func (a *App) UploadData(c *request.Context, us *model.UploadSession, rd io.Read
|
||||
|
||||
// image post-processing
|
||||
if info.IsImage() {
|
||||
if limitErr := checkImageResolutionLimit(info.Width, info.Height); limitErr != nil {
|
||||
if limitErr := checkImageResolutionLimit(info.Width, info.Height, *a.Config().FileSettings.MaxImageResolution); limitErr != nil {
|
||||
return nil, model.NewAppError("uploadData", "app.upload.upload_data.large_image.app_error",
|
||||
map[string]interface{}{"Filename": us.Filename, "Width": info.Width, "Height": info.Height}, "", http.StatusBadRequest)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user