diff --git a/flow360/component/simulation/models/volume_models.py b/flow360/component/simulation/models/volume_models.py index 20243c031..c478d7546 100644 --- a/flow360/component/simulation/models/volume_models.py +++ b/flow360/component/simulation/models/volume_models.py @@ -551,7 +551,7 @@ def _extract_content(cls, input_data): file_content = get_file_content(input_data["file_path"]) - return {"file_path": input_data["file_path"], "content": file_content} + return {"file_path": os.path.basename(input_data["file_path"]), "content": file_content} class AuxiliaryPolarFile(BETSingleInputFileBaseModel): @@ -594,7 +594,11 @@ def _extract_content(cls, input_data): polar_file_obj_list.append( [{"file_path": os.path.join(file_dir, file_name)} for file_name in file_name_list] ) - return {"file_path": file_path, "content": file_content, "polar_files": polar_file_obj_list} + return { + "file_path": os.path.basename(file_path), + "content": file_content, + "polar_files": polar_file_obj_list, + } class XROTORFile(BETSingleInputFileBaseModel):