From 648f333850163efeac486c4b07eb47da415a9c98 Mon Sep 17 00:00:00 2001 From: Saturnino Abril Date: Thu, 29 Jun 2017 22:39:57 +0800 Subject: [PLT-6496] Remove System Console and config settings for image height and width (#6688) * remove System Console and config settings for image height and width * add constants and update config.json * updated as per review --- model/config.go | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'model') diff --git a/model/config.go b/model/config.go index f2b17bced..90b3bd6c8 100644 --- a/model/config.go +++ b/model/config.go @@ -231,12 +231,6 @@ type FileSettings struct { Directory string EnablePublicLink bool PublicLinkSalt *string - ThumbnailWidth int - ThumbnailHeight int - PreviewWidth int - PreviewHeight int - ProfileWidth int - ProfileHeight int InitialFont string AmazonS3AccessKeyId string AmazonS3SecretAccessKey string @@ -1426,30 +1420,6 @@ func (o *Config) IsValid() *AppError { return NewLocAppError("Config.IsValid", "model.config.is_valid.file_driver.app_error", nil, "") } - if o.FileSettings.PreviewHeight < 0 { - return NewLocAppError("Config.IsValid", "model.config.is_valid.file_preview_height.app_error", nil, "") - } - - if o.FileSettings.PreviewWidth <= 0 { - return NewLocAppError("Config.IsValid", "model.config.is_valid.file_preview_width.app_error", nil, "") - } - - if o.FileSettings.ProfileHeight <= 0 { - return NewLocAppError("Config.IsValid", "model.config.is_valid.file_profile_height.app_error", nil, "") - } - - if o.FileSettings.ProfileWidth <= 0 { - return NewLocAppError("Config.IsValid", "model.config.is_valid.file_profile_width.app_error", nil, "") - } - - if o.FileSettings.ThumbnailHeight <= 0 { - return NewLocAppError("Config.IsValid", "model.config.is_valid.file_thumb_height.app_error", nil, "") - } - - if o.FileSettings.ThumbnailWidth <= 0 { - return NewLocAppError("Config.IsValid", "model.config.is_valid.file_thumb_width.app_error", nil, "") - } - if len(*o.FileSettings.PublicLinkSalt) < 32 { return NewLocAppError("Config.IsValid", "model.config.is_valid.file_salt.app_error", nil, "") } -- cgit v1.2.3-1-g7c22