Ver código fonte

fix: #24292 HTTP Request Node Unable to Access File from Start Node When Using Remote URL in Workflow API Call (#24293)

Co-authored-by: 李强04 <liqiang04@gaotu.cn>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
tags/1.8.0
Qiang Lee 2 meses atrás
pai
commit
b84bb4164f
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4
    1
      api/core/workflow/nodes/http_request/executor.py

+ 4
- 1
api/core/workflow/nodes/http_request/executor.py Ver arquivo

@@ -12,6 +12,7 @@ from json_repair import repair_json

from configs import dify_config
from core.file import file_manager
from core.file.enums import FileTransferMethod
from core.helper import ssrf_proxy
from core.variables.segments import ArrayFileSegment, FileSegment
from core.workflow.entities.variable_pool import VariablePool
@@ -228,7 +229,9 @@ 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 == FileTransferMethod.REMOTE_URL and file.remote_url is not None
):
file_tuple = (
file.filename,
file_manager.download(file),

Carregando…
Cancelar
Salvar