fix: max image dimensions are now configurable and have a higher default#41193
fix: max image dimensions are now configurable and have a higher default#41193
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. |
b880035 to
c806846
Compare
jnweiger
left a comment
There was a problem hiding this comment.
We need to clarify the relation between
preview_max_dimensions and preview_max_x/preview_max_y
Sorry, I did not spot the latter pair earlier.
| * Default is 6016x4000. | ||
| */ | ||
| 'preview_max_dimensions' => '6016x4000', | ||
|
|
There was a problem hiding this comment.
A bit further up, we already have this:
/**
* Define the maximum x-axis width for previews
* The maximum width, in pixels, of a preview.
* A value of `null` means there is no limit.
*/
'preview_max_x' => 2048,
/**
* Define the maximum y-axis width for previews
* The maximum height, in pixels, of a preview. A value of `null` means there is no limit.
*/
'preview_max_y' => 2048,
That is confusing now. Those values are used in apps/files_sharing/lib/Controllers/ShareController.php and lib/private/Preview.php
There was a problem hiding this comment.
These are output values.
And the new prop defined input values.
But I see your point...... Let me think....
c806846 to
d05c3c9
Compare
| $maxDimension = \OC::$server->getConfig()->getSystemValue('preview_max_dimensions', '6016x4000'); | ||
| $exploded = explode('x', strtolower($maxDimension)); | ||
| if ($exploded === false || \count($exploded) !== 2) { | ||
| return [6016, 4000]; |
There was a problem hiding this comment.
Code could be refactored so that the default [6016, 4000] only appears once, but up to you.
jnweiger
left a comment
There was a problem hiding this comment.
Ah, thanks for clarification.
11f853f to
8f6a51c
Compare
|


Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: