chatflow工作的HTTP节点无法上传文件 #8214

Closed
opened 2026-02-21 18:24:31 -05:00 by yindo · 6 comments
Owner

Originally created by @zhuojiuya on GitHub (Feb 12, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

[13/Feb/2025:02:01:18 +0000] "POST /v1/files/upload HTTP/1.1" 400 140 "-" "python-httpx/0.27.2" "172.18.0.7"

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

An HTTP request node is added to chatflow. The request api is the file upload api of the agent. The configuration is as follows
http请求,在本地创建的agent应用,在chatflow中添加HTTP请求节点,请求的api是agent的文件上传api接口,配置如下

Image

The following error appears

Image

I was able to successfully request the interface locally

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @zhuojiuya on GitHub (Feb 12, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version [13/Feb/2025:02:01:18 +0000] "POST /v1/files/upload HTTP/1.1" 400 140 "-" "python-httpx/0.27.2" "172.18.0.7" ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce An HTTP request node is added to chatflow. The request api is the file upload api of the agent. The configuration is as follows http请求,在本地创建的agent应用,在chatflow中添加HTTP请求节点,请求的api是agent的文件上传api接口,配置如下 ![Image](https://github.com/user-attachments/assets/867ff3c6-1eff-4c10-a6bb-f3cae812a260) The following error appears ![Image](https://github.com/user-attachments/assets/fc6e7e25-3d6d-4cfe-abb7-ab639cd55404) I was able to successfully request the interface locally ![Image](https://github.com/user-attachments/assets/838e1d75-80e2-4205-b13f-98a922a000a1) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-21 18:24:31 -05:00
Author
Owner

@crazywoola commented on GitHub (Feb 12, 2025):

[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)

@crazywoola commented on GitHub (Feb 12, 2025): [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
Author
Owner

@dosubot[bot] commented on GitHub (Feb 12, 2025):

Hello, @zhuojiuya! I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together while we wait for a human maintainer.

I found a similar issue regarding file uploads in Dify's chatflow HTTP request node. There is a known limitation where file uploads larger than 800KB fail with a 'Server disconnected without sending a response' error. The recommended workaround is to use a Python code node instead of the HTTP request node for handling larger file uploads [1].

Additionally, ensure that the Content-Type is correctly set to multipart/form-data and that all required headers and parameters are included, such as the Authorization header with a Bearer token and the file parameter in the form data [2].

If the issue persists, consider checking the server configuration or network settings, as the HTTP_REQUEST_NODE_MAX_BINARY_SIZE is set to 10MB in the docker-compose.yaml, which suggests that the limitation might be due to other factors [3].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other | Bug Report

@dosubot[bot] commented on GitHub (Feb 12, 2025): <!-- Greeting --> Hello, @zhuojiuya! I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together while we wait for a human maintainer. <!-- Answer --> I found a similar issue regarding file uploads in Dify's chatflow HTTP request node. There is a known limitation where file uploads larger than 800KB fail with a 'Server disconnected without sending a response' error. The recommended workaround is to use a Python code node instead of the HTTP request node for handling larger file uploads <sup>[[1]](https://github.com/langgenius/dify/issues/12216)</sup>. Additionally, ensure that the `Content-Type` is correctly set to `multipart/form-data` and that all required headers and parameters are included, such as the `Authorization` header with a Bearer token and the `file` parameter in the form data <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/controllers/console/files.py)</sup>. If the issue persists, consider checking the server configuration or network settings, as the `HTTP_REQUEST_NODE_MAX_BINARY_SIZE` is set to 10MB in the `docker-compose.yaml`, which suggests that the limitation might be due to other factors <sup>[[3]](https://github.com/langgenius/dify/blob/main/docker/docker-compose.yaml)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/91d20c7d-d16c-4282-b3a8-dfe63cff5f32?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/91d20c7d-d16c-4282-b3a8-dfe63cff5f32?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/91d20c7d-d16c-4282-b3a8-dfe63cff5f32?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/91d20c7d-d16c-4282-b3a8-dfe63cff5f32?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/91d20c7d-d16c-4282-b3a8-dfe63cff5f32?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/91d20c7d-d16c-4282-b3a8-dfe63cff5f32?feedback_type=other) | [Bug Report](https://app.dosu.dev/response-feedback/91d20c7d-d16c-4282-b3a8-dfe63cff5f32?feedback_type=bug_report)</sup>
Author
Owner

@crazywoola commented on GitHub (Feb 12, 2025):

Image

This type accepts a File only, not Array[File]

@crazywoola commented on GitHub (Feb 12, 2025): <img width="325" alt="Image" src="https://github.com/user-attachments/assets/057a60a3-b652-49dc-a1cf-749e96fd114e" /> This type accepts a `File` only, not `Array[File]`
Author
Owner

@zhuojiuya commented on GitHub (Feb 12, 2025):

Image This type accepts a `File` only, not `Array[File]`此类型仅接受 `File` ,不接受 `Array[File]`

It looks like we can only select Array[File]
Image

@zhuojiuya commented on GitHub (Feb 12, 2025): > <img alt="Image" width="325" src="https://private-user-images.githubusercontent.com/100913391/412684308-057a60a3-b652-49dc-a1cf-749e96fd114e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MTI3MDMsIm5iZiI6MTczOTQxMjQwMywicGF0aCI6Ii8xMDA5MTMzOTEvNDEyNjg0MzA4LTA1N2E2MGEzLWI2NTItNDlkYy1hMWNmLTc0OWU5NmZkMTE0ZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxM1QwMjA2NDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yMWRkN2UzNTk3NmMxNzk3NWQ3YWZmMzBmYTdjYzI3N2VjNGIwYWRiOGNmMmMwMjdkODliZmNiOGU5M2VmZDI3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.B_Kq_uhsQP6CxTPLJGZ8XrW-nAsA-gi9c2IgpXTEimA"> > This type accepts a `File` only, not `Array[File]`此类型仅接受 `File` ,不接受 `Array[File]` It looks like we can only select Array[File] ![Image](https://github.com/user-attachments/assets/921da25e-c0a1-4a65-97a0-226cc945f3f1)
Author
Owner

@crazywoola commented on GitHub (Feb 12, 2025):

Then it's not supported in this node, you need to find way to extract them either from iteration node or code node.

@crazywoola commented on GitHub (Feb 12, 2025): Then it's not supported in this node, you need to find way to extract them either from iteration node or code node.
Author
Owner

@a386572631 commented on GitHub (Mar 31, 2025):

Then it's not supported in this node, you need to find way to extract them either from iteration node or code node.

Image

Image

Image

The type is File, also not supported. The input is null.

@a386572631 commented on GitHub (Mar 31, 2025): > Then it's not supported in this node, you need to find way to extract them either from iteration node or code node. ![Image](https://github.com/user-attachments/assets/f0d927da-5330-4d9e-aad8-723827e2b94b) ![Image](https://github.com/user-attachments/assets/5ff1f789-cfb7-4134-aada-eb862ebf1cd9) ![Image](https://github.com/user-attachments/assets/4ec4703d-f216-49fd-b0b1-0172cffc4f70) The type is File, also not supported. The input is null.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8214