http request node upload big file fail #7090

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

Originally created by @ospfrip on GitHub (Dec 6, 2024).

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

0.13.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

The HTTP request node in the workflow, whether using form-data or binary mode to upload files, successfully uploads files of a few hundred kilobytes, but fails to upload larger files, close to 2MB. This issue has been present from version 0.11.1 to the latest version 0.13.1.

✔️ Expected Behavior

upload successful

Actual Behavior

Upload file successful.

Originally created by @ospfrip on GitHub (Dec 6, 2024). ### 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 0.13.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce The HTTP request node in the workflow, whether using form-data or binary mode to upload files, successfully uploads files of a few hundred kilobytes, but fails to upload larger files, close to 2MB. This issue has been present from version 0.11.1 to the latest version 0.13.1. ### ✔️ Expected Behavior upload successful ### ❌ Actual Behavior Upload file successful.
yindo added the 🐞 bug label 2026-02-21 18:18:52 -05:00
yindo closed this issue 2026-02-21 18:18:52 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 6, 2024):

Hey @ospfrip! 👋 I'm here to help you with your bug report. I'm a bot that can assist with bug-solving, answering questions, and becoming a contributor. Let's squash those bugs together!

The issue you're experiencing with the HTTP request node failing to upload larger files, close to 2MB, might be related to the configuration of the file size limits in Dify. The environment variables HTTP_REQUEST_NODE_MAX_BINARY_SIZE and HTTP_REQUEST_NODE_MAX_TEXT_SIZE control the maximum size for binary and text data uploads, respectively.

For binary data, the default limit is set to 10MB (10485760 bytes), which should be sufficient for your needs. However, if the file is being treated as text, it might be subject to the 1MB limit (1048576 bytes), causing the failure. Ensure that the file is being uploaded as binary data to avoid this limitation [1].

If you need to increase these limits, you can adjust the environment variables in your configuration. For example, to increase the binary size limit to 20MB, set HTTP_REQUEST_NODE_MAX_BINARY_SIZE=20971520 [1].

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Dec 6, 2024): <!-- Greeting --> Hey @ospfrip! 👋 I'm here to help you with your bug report. I'm a bot that can assist with bug-solving, answering questions, and becoming a contributor. Let's squash those bugs together! <!-- Answer --> The issue you're experiencing with the HTTP request node failing to upload larger files, close to 2MB, might be related to the configuration of the file size limits in Dify. The environment variables `HTTP_REQUEST_NODE_MAX_BINARY_SIZE` and `HTTP_REQUEST_NODE_MAX_TEXT_SIZE` control the maximum size for binary and text data uploads, respectively. For binary data, the default limit is set to 10MB (`10485760` bytes), which should be sufficient for your needs. However, if the file is being treated as text, it might be subject to the 1MB limit (`1048576` bytes), causing the failure. Ensure that the file is being uploaded as binary data to avoid this limitation <sup>[[1]](https://github.com/langgenius/dify/blob/main/docker/.env.example)</sup>. If you need to increase these limits, you can adjust the environment variables in your configuration. For example, to increase the binary size limit to 20MB, set `HTTP_REQUEST_NODE_MAX_BINARY_SIZE=20971520` <sup>[[1]](https://github.com/langgenius/dify/blob/main/docker/.env.example)</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/93384b3b-2746-401b-9086-ec2459b8963c?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/93384b3b-2746-401b-9086-ec2459b8963c?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/93384b3b-2746-401b-9086-ec2459b8963c?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/93384b3b-2746-401b-9086-ec2459b8963c?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/93384b3b-2746-401b-9086-ec2459b8963c?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/93384b3b-2746-401b-9086-ec2459b8963c?feedback_type=other)</sup>
Author
Owner

@ospfrip commented on GitHub (Dec 6, 2024):

Thanks, Should the .env file also be copied to the API directory?

@ospfrip commented on GitHub (Dec 6, 2024): Thanks, Should the .env file also be copied to the API directory?
Author
Owner

@ospfrip commented on GitHub (Dec 6, 2024):

I have changed the configuration, but it didn't take effect. It can be turned off now.

@ospfrip commented on GitHub (Dec 6, 2024): I have changed the configuration, but it didn't take effect. It can be turned off now.
Author
Owner

@dosubot[bot] commented on GitHub (Dec 6, 2024):

Yes, the .env file should be copied to the API directory for the configuration changes to take effect. You need to navigate to the "api" directory and copy the environment variable configuration file using the following command:

cd api
cp .env.example .env

After making changes to the .env file, you should restart the Dify services to apply the changes. You can do this by running:

docker-compose down
docker-compose -f docker-compose.yaml -f docker-compose.override.yaml up -d

This will ensure that the updated configuration is used by the services [1][2].

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Dec 6, 2024): <!-- Answer --> Yes, the `.env` file should be copied to the API directory for the configuration changes to take effect. You need to navigate to the "api" directory and copy the environment variable configuration file using the following command: ```bash cd api cp .env.example .env ``` After making changes to the `.env` file, you should restart the Dify services to apply the changes. You can do this by running: ```bash docker-compose down docker-compose -f docker-compose.yaml -f docker-compose.override.yaml up -d ``` This will ensure that the updated configuration is used by the services <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/getting-started/install-self-hosted/local-source-code.md)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/getting-started/install-self-hosted/faqs.md)</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/d81d68b6-76a8-45ce-b30a-2a8f5b177078?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d81d68b6-76a8-45ce-b30a-2a8f5b177078?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d81d68b6-76a8-45ce-b30a-2a8f5b177078?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d81d68b6-76a8-45ce-b30a-2a8f5b177078?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d81d68b6-76a8-45ce-b30a-2a8f5b177078?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/d81d68b6-76a8-45ce-b30a-2a8f5b177078?feedback_type=other)</sup>
Author
Owner

@ospfrip commented on GitHub (Dec 6, 2024):

I changed the configuration, restarted Dify, but uploading images still doesn't work.
API log

@ospfrip commented on GitHub (Dec 6, 2024): I changed the configuration, restarted Dify, but uploading images still doesn't work. ![API log](https://github.com/user-attachments/assets/6c6eac03-d91f-4581-bd9e-aceab18d6d73)
Author
Owner

@chace100 commented on GitHub (Dec 8, 2024):

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

0.13.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

The HTTP request node in the workflow, whether using form-data or binary mode to upload files, successfully uploads files of a few hundred kilobytes, but fails to upload larger files, close to 2MB. This issue has been present from version 0.11.1 to the latest

✔️ Expected Behavior

upload successful

Actual Behavior

Upload file successful.

Hello, I would like to ask how you set up the form data method for uploading files using HTTP nodes? When I use form data to upload files, the third-party API always returns a prompt stating that there is no file content.

@chace100 commented on GitHub (Dec 8, 2024): > ### 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 > 0.13.1 > > ### Cloud or Self Hosted > Self Hosted (Docker) > > ### Steps to reproduce > The HTTP request node in the workflow, whether using form-data or binary mode to upload files, successfully uploads files of a few hundred kilobytes, but fails to upload larger files, close to 2MB. This issue has been present from version 0.11.1 to the latest > > ### ✔️ Expected Behavior > upload successful > > ### ❌ Actual Behavior > Upload file successful. Hello, I would like to ask how you set up the form data method for uploading files using HTTP nodes? When I use form data to upload files, the third-party API always returns a prompt stating that there is no file content.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7090