superseriousbusiness / gotosocial

Fast, fun, small ActivityPub server.
https://docs.gotosocial.org
GNU Affero General Public License v3.0
3.85k stars 339 forks source link

[feature] add support for hinting via api/v_/instance preferred image / video max sizes #3505

Closed NyaaaWhatsUpDoc closed 3 weeks ago

NyaaaWhatsUpDoc commented 3 weeks ago

Description

When left unset, defaults to local max size. The reason i didn't actually add local-image-max-size and local-video-max-size is in doing that it potentially opens us up for requiring local-audio-max-size, and potentially any other file types that we separate on in the future. It makes more sense to have a single local max size, and allow tweaking the frontend hinting that applications like Tusky use for autosizing.

It also updates the unused media limits (framerate, image / video dimensions) to just be the maximum possible int sizes. In case Tusky does try to limit based on those since we can support anything under the local max size.

closes #3449

Checklist