From 4ccf071be6d9ed5f2e8b1660bb615ec5250d8e35 Mon Sep 17 00:00:00 2001 From: sauravniraula Date: Mon, 28 Jul 2025 18:25:04 +0545 Subject: [PATCH] fix(fastapi): improves presentation export fetch assets to not fetch local app_data files --- .../fastapi/services/pptx_presentation_creator.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/servers/fastapi/services/pptx_presentation_creator.py b/servers/fastapi/services/pptx_presentation_creator.py index cf387b6c..3f682e09 100644 --- a/servers/fastapi/services/pptx_presentation_creator.py +++ b/servers/fastapi/services/pptx_presentation_creator.py @@ -73,10 +73,10 @@ class PptxPresentationCreator: if isinstance(each_shape, PptxPictureBoxModel): image_path = each_shape.picture.path if image_path.startswith("http"): - if "app_data/images" in image_path: - relative_path = image_path.split("/app_data/images/")[1] + if "app_data/" in image_path: + relative_path = image_path.split("/app_data/")[1] each_shape.picture.path = os.path.join( - "app_data/images", relative_path + "app_data", relative_path ) each_shape.picture.is_network = False continue @@ -88,10 +88,10 @@ class PptxPresentationCreator: if isinstance(each_shape, PptxPictureBoxModel): image_path = each_shape.picture.path if image_path.startswith("http"): - if "app_data/images" in image_path: - relative_path = image_path.split("/app_data/images/")[1] + if "app_data" in image_path: + relative_path = image_path.split("/app_data/")[1] each_shape.picture.path = os.path.join( - "app_data/images", relative_path + "app_data", relative_path ) each_shape.picture.is_network = False continue