mirror of
https://github.com/langgenius/dify-docs-archived.git
synced 2026-07-25 13:35:35 -04:00
关于HTTP请求节点的返回值files,是怎么构建的?(不使用插件开发可以做到吗) #145
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Teenye on GitHub (Apr 19, 2025).
您好作者,我在dify的工作流中看到了http请求有一个返回值files。请问自定义http请求时,怎么返回这个返回值files呢?比如返回多张图片文件和一个文本文件
@dosubot[bot] commented on GitHub (Apr 19, 2025):
Hello @Teenye! I'm Dosu, here to help you with any bugs, questions, or contributions you might have while we wait for a human maintainer. Let's tackle your issue together!
在 Dify 的工作流中,HTTP 请求节点会自动处理返回值中的
files,并保存这些文件以供后续步骤使用。目前,它仅支持图像类型的文件 [1]。关于如何在自定义 HTTP 请求中返回多个文件(如多张图片和一个文本文件),我没有找到具体的格式或示例代码。如果需要进一步的信息,可能需要查看其他资源或文档。To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
@Teenye commented on GitHub (Apr 19, 2025):
似乎我看到,使用插件的话是可以通过create_blob_message来构建files的返回值。但是我这边有些原因没法通过插件的形式来开发。请问只用http请求是否也可以得到这个files返回值给dify用于后续的分析呢?如果你知道怎么样设计这样的http response请告诉我,谢谢你~
@dosubot[bot] commented on GitHub (Apr 19, 2025):
在不使用插件的情况下,通过 HTTP 请求节点返回
files值的具体方法和格式在 Dify 文档中没有明确说明。不过,您可以尝试使用multipart/form-data格式来上传文件,因为这种格式通常用于文件上传的 HTTP 请求。请注意,Dify 对文件的上传有一些限制:单个文件的大小限制为 15MB,最多可以同时上传 5 个文件 [1]。如果您需要进一步的指导,可能需要查看其他相关的文档或资源。
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other