From 1e02f5dafd90c57ffa252b5490bd806db1a175d6 Mon Sep 17 00:00:00 2001 From: FFXN Date: Sat, 9 May 2026 10:34:44 +0800 Subject: [PATCH] fix: Using CONSOLE_API_URL to generate an image preview URL causes the image preview to fail on the chunks details page of the knowledge base. --- api/models/dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/models/dataset.py b/api/models/dataset.py index e323ccfd7f..7e8efee217 100644 --- a/api/models/dataset.py +++ b/api/models/dataset.py @@ -965,7 +965,7 @@ class DocumentSegment(Base): encoded_sign = base64.urlsafe_b64encode(sign).decode() params = f"timestamp={timestamp}&nonce={nonce}&sign={encoded_sign}" - reference_url = dify_config.CONSOLE_API_URL or "" + reference_url = dify_config.FILES_URL or dify_config.CONSOLE_API_URL or "" base_url = f"{reference_url}/files/{upload_file_id}/image-preview" source_url = f"{base_url}?{params}" attachment_list.append(