in app/app.py [0:0]
def _process_content(content) -> str | list[str]:
if isinstance(content, str) and _is_file_safe(content):
return _convert_path_to_data_uri(content)
elif isinstance(content, list) or isinstance(content, tuple):
return _convert_path_to_data_uri(content[0])
return content