Alt text should be able to be one million characters long. This pull requests lets the alt text limit be set from .env as MAX_ALT_TEXT_CHARS (defaulting to the current 1500.
Also added to /api/instance and /api/v1/instance
Alt text config implementation:
Set in .env (with example in .env.production.sample)
Set in Rails in MediaAttachment model as MAX_DESCRIPTION_LENGTH by reading from ENV
Read by Rails in initial_state_serializer and instance_serializer for both v1 and v2 apis
Transferred to js from initialState as maxAltTextChars
Alt text should be able to be one million characters long. This pull requests lets the alt text limit be set from .env as
MAX_ALT_TEXT_CHARS
(defaulting to the current 1500.Also added to
/api/instance
and/api/v1/instance
Alt text config implementation:
MediaAttachment
model asMAX_DESCRIPTION_LENGTH
by reading from ENVinitial_state_serializer
andinstance_serializer
for both v1 and v2 apismaxAltTextChars
API Changes:
/api/v1/instance
max_alt_text_characters
configuration.media_attachments.max_alt_text_characters
/api/instance
configuration.media_attachments.max_alt_text_characters
Also fixed an unexplained reversion in https://github.com/mastodon/mastodon/commit/71f2b95106b2e75d3efb40040b29c216c2d99ee6 that invalidates alt text that is longer than the local limit.