From ee79b617a3989700fc2fd2753a86b0accb58f0a0 Mon Sep 17 00:00:00 2001 From: baonudesifeizhai Date: Sat, 5 Jul 2025 05:12:01 -0400 Subject: [PATCH] fix: http request node sends no binary data for remote_url file Fixes: #21913 --- api/core/workflow/nodes/http_request/executor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/core/workflow/nodes/http_request/executor.py b/api/core/workflow/nodes/http_request/executor.py index 2c83b00d4a..43b1d12d3d 100644 --- a/api/core/workflow/nodes/http_request/executor.py +++ b/api/core/workflow/nodes/http_request/executor.py @@ -225,7 +225,7 @@ class Executor: files: dict[str, list[tuple[str | None, bytes, str]]] = {} for key, files_in_segment in files_list: for file in files_in_segment: - if file.related_id is not None: + if file.related_id is not None or file.transfer_method == 'remote_url': file_tuple = ( file.filename, file_manager.download(file), @@ -390,7 +390,7 @@ class Executor: body_string += content.decode("utf-8") except UnicodeDecodeError: # fix: decode binary content - pass + body_string += f"[Binary data of {len(content)} bytes]" body_string += "\r\n" body_string += f"--{boundary}--\r\n" elif self.node_data.body: