From e8077ffdb57c52303584479c9d211ca38878e8c0 Mon Sep 17 00:00:00 2001 From: sauravniraula Date: Thu, 15 May 2025 06:52:42 +0545 Subject: [PATCH] Fixes: beggining / issue in fetch presentation in windows --- .../routers/presentation/mixins/fetch_presentation_assets.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/servers/fastapi/api/routers/presentation/mixins/fetch_presentation_assets.py b/servers/fastapi/api/routers/presentation/mixins/fetch_presentation_assets.py index 033f4a9e..671462c6 100644 --- a/servers/fastapi/api/routers/presentation/mixins/fetch_presentation_assets.py +++ b/servers/fastapi/api/routers/presentation/mixins/fetch_presentation_assets.py @@ -24,7 +24,10 @@ class FetchPresentationAssetsMixin: image_path = os.path.join(self.temp_dir, image_name) image_local_paths.append(image_path) elif image_path.startswith("file://"): - image_path = image_path.replace("file://", "") + image_path = image_path.replace("file:///", "") + # Check if it's a Windows path (has colon at index 1) + if not (len(image_path) > 1 and image_path[1] == ':'): + image_path = '/' + image_path each_shape.picture.path = image_path each_shape.picture.is_network = False