Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

feat: compatible custom avatar url (#26975)

ZalterCittyc91cbf6b9744
diff --git a/api/libs/helper.py b/api/libs/helper.py
index b878141d8e3..60484dd40b7 100644
--- a/api/libs/helper.py
+++ b/api/libs/helper.py
@@ -81,6 +81,8 @@ class AvatarUrlField(fields.Raw):
from models import Account
if isinstance(obj, Account) and obj.avatar is not None:
+ if obj.avatar.startswith(("http://", "https://")):
+ return obj.avatar
return file_helpers.get_signed_file_url(obj.avatar)
return None