From 4354d4259e309f266b3a968c37e5ced595b078c0 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Sun, 7 Jan 2024 18:15:28 +1300 Subject: [PATCH] fix invalid Activity when sending image post --- app/community/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/community/util.py b/app/community/util.py index f1d06ced..4817f513 100644 --- a/app/community/util.py +++ b/app/community/util.py @@ -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)