[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>
This commit is contained in:
kim 2025-06-10 15:43:31 +02:00 committed by kim
commit d7f967cbb5
17 changed files with 902 additions and 1099 deletions

View file

@ -376,7 +376,7 @@ func sqliteConn(ctx context.Context) (*sql.DB, func() schema.Dialect, error) {
// validate db address has actually been set
address := config.GetDbAddress()
if address == "" {
return nil, nil, fmt.Errorf("'%s' was not set when attempting to start sqlite", config.DbAddressFlag())
return nil, nil, fmt.Errorf("'%s' was not set when attempting to start sqlite", config.DbAddressFlag)
}
// Build SQLite connection address with prefs.

View file

@ -65,7 +65,7 @@ func init() {
storageBasePath := config.GetStorageLocalBasePath()
if storageBasePath == "" {
return fmt.Errorf("%s must be set to do storage migration", config.StorageLocalBasePathFlag())
return fmt.Errorf("%s must be set to do storage migration", config.StorageLocalBasePathFlag)
}
return db.RunInTx(ctx, nil, func(ctx context.Context, tx bun.Tx) error {