From 04fe2341a6d5dc7e074314a330c958239be8ce17 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Thu, 31 Jul 2025 09:38:47 +0200 Subject: [PATCH] feat: introduce alias for thumbnail max dimensions and change default --- services/thumbnails/pkg/config/config.go | 4 ++-- services/thumbnails/pkg/config/defaults/defaultconfig.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/thumbnails/pkg/config/config.go b/services/thumbnails/pkg/config/config.go index a64671dc90..de67febb85 100644 --- a/services/thumbnails/pkg/config/config.go +++ b/services/thumbnails/pkg/config/config.go @@ -44,7 +44,7 @@ type Thumbnail struct { FontMapFile string `yaml:"font_map_file" env:"THUMBNAILS_TXT_FONTMAP_FILE" desc:"The path to a font file for txt thumbnails." introductionVersion:"1.0.0"` TransferSecret string `yaml:"transfer_secret" env:"THUMBNAILS_TRANSFER_TOKEN" desc:"The secret to sign JWT to download the actual thumbnail file." introductionVersion:"1.0.0"` DataEndpoint string `yaml:"data_endpoint" env:"THUMBNAILS_DATA_ENDPOINT" desc:"The HTTP endpoint where the actual thumbnail file can be downloaded." introductionVersion:"1.0.0"` - MaxInputWidth int `yaml:"max_input_width" env:"THUMBNAILS_MAX_INPUT_WIDTH" desc:"The maximum width of an input image which is being processed." introductionVersion:"1.0.0"` - MaxInputHeight int `yaml:"max_input_height" env:"THUMBNAILS_MAX_INPUT_HEIGHT" desc:"The maximum height of an input image which is being processed." introductionVersion:"1.0.0"` + MaxInputWidth int `yaml:"max_input_width" env:"THUMBNAILS_MAX_INPUT_WIDTH;THUMBNAILS_MAX_INPUT_DIMENSION" desc:"The maximum width of an input image which is being processed." introductionVersion:"1.0.0"` + MaxInputHeight int `yaml:"max_input_height" env:"THUMBNAILS_MAX_INPUT_HEIGHT;THUMBNAILS_MAX_INPUT_DIMENSION" desc:"The maximum height of an input image which is being processed." introductionVersion:"1.0.0"` MaxInputImageFileSize string `yaml:"max_input_image_file_size" env:"THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE" desc:"The maximum file size of an input image which is being processed. Usable common abbreviations: [KB, KiB, MB, MiB, GB, GiB, TB, TiB, PB, PiB, EB, EiB], example: 2GB." introductionVersion:"1.0.0"` } diff --git a/services/thumbnails/pkg/config/defaults/defaultconfig.go b/services/thumbnails/pkg/config/defaults/defaultconfig.go index 37551d8d24..ffbc702643 100644 --- a/services/thumbnails/pkg/config/defaults/defaultconfig.go +++ b/services/thumbnails/pkg/config/defaults/defaultconfig.go @@ -55,8 +55,8 @@ func DefaultConfig() *config.Config { RevaGateway: shared.DefaultRevaConfig().Address, CS3AllowInsecure: false, DataEndpoint: "http://127.0.0.1:9186/thumbnails/data", - MaxInputWidth: 7680, - MaxInputHeight: 7680, + MaxInputWidth: 10000, + MaxInputHeight: 10000, MaxInputImageFileSize: "50MB", }, }