mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
max length of 300 chars of alt text #78
This commit is contained in:
parent
15f834c08e
commit
7dd5c61bc7
1 changed files with 1 additions and 1 deletions
|
@ -240,7 +240,7 @@ def save_post(form, post: Post):
|
|||
if file_extension.lower() in allowed_extensions and not filename.startswith('/'):
|
||||
file = url_to_thumbnail_file(filename)
|
||||
if file:
|
||||
file.alt_text = opengraph.get('og:title')
|
||||
file.alt_text = shorten_string(opengraph.get('og:title'), 295)
|
||||
post.image = file
|
||||
db.session.add(file)
|
||||
|
||||
|
|
Loading…
Reference in a new issue