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.

fix: improve content decoding in AppDslService (#12304)

-LAN-375aa38f5d18
diff --git a/api/services/app_dsl_service.py b/api/services/app_dsl_service.py
index 2c4fbe1a596..f81ce8393e3 100644
--- a/api/services/app_dsl_service.py
+++ b/api/services/app_dsl_service.py
@@ -104,7 +104,7 @@ class AppDslService:
raise ValueError(f"Invalid import_mode: {import_mode}")
# Get YAML content
- content: bytes | str = b""
+ content: str = ""
if mode == ImportMode.YAML_URL:
if not yaml_url:
return Import(
@@ -124,7 +124,7 @@ class AppDslService:
yaml_url = yaml_url.replace("/blob/", "/")
response = ssrf_proxy.get(yaml_url.strip(), follow_redirects=True, timeout=(10, 10))
response.raise_for_status()
- content = response.content
+ content = response.content.decode()
if len(content) > max_size:
return Import(