[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
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
e1168ab7cc
Коммит
648f333850
@@ -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, "")
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user