-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add maximum image file size to be processed by the thumbnailer #9069
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
MaxInputWidth int `yaml:"max_input_width" env:"THUMBNAILS_MAX_INPUT_WIDTH" desc:"The maximum width of an input image which is being processed." introductionVersion:"6.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:"6.0"` | ||
MaxInputImageFileSize uint64 `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." introductionVersion:"6.0"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add the unit of the value in the description. int and uint64 is just the computational range.
Example:
The maximum file size of an input image which is being processed.
-->
The maximum file size in bytes of an input image that will be processed.
We also should describe what will happen with unprocessed images. How will the thumbnail look like? (Imho it would be great to have a kind of dummy image available showing - "no thumbnail available" to avoid confusion)
e1abd8c
to
7d92c1c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from a docs pov 👍
25e05db
to
e3f4115
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this need a Changelog. Looks good otherwise.
e3f4115
to
a0990ce
Compare
done - added to other changelog item which falls into the same topic |
a0990ce
to
8117fe3
Compare
DataEndpoint string `yaml:"data_endpoint" env:"THUMBNAILS_DATA_ENDPOINT" desc:"The HTTP endpoint where the actual thumbnail file can be downloaded." introductionVersion:"pre5.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:"6.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:"6.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:"6.0"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have some experience how the file size maps to memory consumption when generating a thumbnail?
Just as a "unrelated" question: are there any plans to limit the concurrency for generating thumbnails, too? Because only if we know the approx memory to be used for a thumbnail generation and how many can be generated in parallel, we could effectively constrain the memory limits (eg. in Kubernetes).
cc @d7oc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have some experience how the file size maps to memory consumption when generating a thumbnail?
not really - and this is rather complicated...
From my understanding the image dimensions are more critical to this. A rather small file can hold an image with gigantic dimensions which can blow up the thumbnailer pretty easy ....
Just as a "unrelated" question: are there any plans to limit the concurrency for generating thumbnails, too?
I did not look into this yet. Feel free to add this to https://github.com/owncloud/enterprise/issues/6388
THX
8117fe3
to
0be461b
Compare
Quality Gate passedIssues Measures |
…wncloud#9069) (cherry picked from commit 06bb8c9)
Description
Yet another hardening around the thumbnail service.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: