mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
fix invalid Activity when sending image post
This commit is contained in:
parent
908ae14799
commit
4354d4259e
1 changed files with 2 additions and 1 deletions
|
@ -247,7 +247,8 @@ def save_post(form, post: Post):
|
|||
|
||||
file = File(file_path=final_place, file_name=new_filename + file_ext, alt_text=form.image_title.data,
|
||||
width=img_width, height=img_height, thumbnail_width=thumbnail_width,
|
||||
thumbnail_height=thumbnail_height, thumbnail_path=final_place_thumbnail)
|
||||
thumbnail_height=thumbnail_height, thumbnail_path=final_place_thumbnail,
|
||||
source_url=final_place.replace('app/static/', f"https://{current_app.config['SERVER_NAME']}/static/"))
|
||||
post.image = file
|
||||
db.session.add(file)
|
||||
|
||||
|
|
Loading…
Reference in a new issue