summaryrefslogtreecommitdiff
path: root/testrig/config.go
diff options
context:
space:
mode:
authorLibravatar kim <grufwub@gmail.com>2025-06-10 15:43:31 +0200
committerLibravatar kim <gruf@noreply.codeberg.org>2025-06-10 15:43:31 +0200
commitd7f967cbb599c64d18fe951d1725bf3050597dda (patch)
tree061a302732684980e3dbf3f1a6012f3cbef01e26 /testrig/config.go
parent[chore] Update interactionPolicy sub-policy parsing in line with documented d... (diff)
downloadgotosocial-d7f967cbb599c64d18fe951d1725bf3050597dda.tar.xz
[feature] configurable maximum thumbnail dimensions (#4258)
- adds configuration for thumbnail maximum dimensions with warning on exceeding recommendations - moves the media configuration vars into their own sub-struct - replaces the configuration flag funcs with simple string consts Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4258 Reviewed-by: tobi <kipvandenbos@noreply.codeberg.org> Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'testrig/config.go')
-rw-r--r--testrig/config.go21
1 files changed, 12 insertions, 9 deletions
diff --git a/testrig/config.go b/testrig/config.go
index b8471244e..af2b8d287 100644
--- a/testrig/config.go
+++ b/testrig/config.go
@@ -114,15 +114,18 @@ func testDefaults() config.Configuration {
AccountsCustomCSSLength: 10000,
AccountsMaxProfileFields: 8,
- MediaDescriptionMinChars: 0,
- MediaDescriptionMaxChars: 500,
- MediaRemoteCacheDays: 7,
- MediaLocalMaxSize: 40 * bytesize.MiB,
- MediaRemoteMaxSize: 40 * bytesize.MiB,
- MediaEmojiLocalMaxSize: 51200, // 50KiB
- MediaEmojiRemoteMaxSize: 102400, // 100KiB
- MediaCleanupFrom: "00:00", // midnight.
- MediaCleanupEvery: 24 * time.Hour, // 1/day.
+ Media: config.MediaConfiguration{
+ DescriptionMinChars: 0,
+ DescriptionMaxChars: 500,
+ RemoteCacheDays: 7,
+ LocalMaxSize: 40 * bytesize.MiB,
+ RemoteMaxSize: 40 * bytesize.MiB,
+ EmojiLocalMaxSize: 51200, // 50KiB
+ EmojiRemoteMaxSize: 102400, // 100KiB
+ CleanupFrom: "00:00", // midnight.
+ CleanupEvery: 24 * time.Hour, // 1/day.
+ ThumbMaxPixels: 512,
+ },
// the testrig only uses in-memory storage, so we can
// safely set this value to 'test' to avoid running storage