docker upload video file error: Failed to read file, please choose again #12072

Closed
opened 2026-02-21 19:05:36 -05:00 by yindo · 5 comments
Owner

Originally created by @LostRod on GitHub (Mar 24, 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

1.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

"I modified the .env file with UPLOAD_VIDEO_FILE_SIZE_LIMIT=1000000 and NGINX_CLIENT_MAX_BODY_SIZE=1500000M.

Then, I uploaded a 2GB video file and tested the upload in the workflow, which resulted in an error.

Image

However, when I tried uploading a 700MB video file, it uploaded successfully without any issues."

Image

✔️ Expected Behavior

Upload successful.

Actual Behavior

Shows "File read failed, please choose the file again."

Originally created by @LostRod on GitHub (Mar 24, 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 1.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce "I modified the .env file with UPLOAD_VIDEO_FILE_SIZE_LIMIT=1000000 and NGINX_CLIENT_MAX_BODY_SIZE=1500000M. Then, I uploaded a 2GB video file and tested the upload in the workflow, which resulted in an error. ![Image](https://github.com/user-attachments/assets/be4a3746-b1ce-48da-9348-2cafd64b94ff) However, when I tried uploading a 700MB video file, it uploaded successfully without any issues." ![Image](https://github.com/user-attachments/assets/b1b65c6f-2b67-44a7-801a-008d3b91917f) ### ✔️ Expected Behavior Upload successful. ### ❌ Actual Behavior Shows "File read failed, please choose the file again."
yindo added the 🐞 bug🤔 cant-reproducestale labels 2026-02-21 19:05:36 -05:00
yindo closed this issue 2026-02-21 19:05:37 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 24, 2025):

@LostRod Hello! I'm here to help you with bug reports, answer questions, and guide you on how to become a contributor. Let's tackle this issue together while we wait for a human maintainer.

I found a similar unsolved discussion that might be relevant to your issue: General Discussion [1].

Regarding your issue, it seems like the error might be related to the file size limits set in your configuration. Here are a few things you could check or try:

  1. Verify Configuration Values: Double-check the values set for UPLOAD_VIDEO_FILE_SIZE_LIMIT and NGINX_CLIENT_MAX_BODY_SIZE in your .env file. Ensure they are correctly formatted and that the units are consistent.

  2. NGINX Configuration: Make sure that the NGINX_CLIENT_MAX_BODY_SIZE is set correctly in your NGINX configuration file. Sometimes, changes in the .env file might not reflect if the NGINX configuration is not reloaded or if there are overrides elsewhere.

  3. Docker Resource Limits: Check if there are any resource limits set on your Docker container that might be affecting the upload process. You might need to increase the memory or CPU limits.

  4. Logs and Error Messages: Look into the logs for more detailed error messages that might give additional insights into why the file read is failing.

  5. Test with Different File Sizes: Since a 700MB file uploaded successfully, try testing with files of varying sizes to pinpoint the threshold where the error occurs.

These steps might help in diagnosing and resolving the issue. If the problem persists, consider providing more detailed logs or error messages for further assistance.

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

@dosubot[bot] commented on GitHub (Mar 24, 2025): <!-- Greeting --> @LostRod Hello! I'm here to help you with bug reports, answer questions, and guide you on how to become a contributor. Let's tackle this issue together while we wait for a human maintainer. <!-- Answer --> I found a similar unsolved discussion that might be relevant to your issue: [General Discussion](https://github.com/langgenius/dify/discussions/16030) <sup>[[1]](https://github.com/langgenius/dify/discussions/16030)</sup>. Regarding your issue, it seems like the error might be related to the file size limits set in your configuration. Here are a few things you could check or try: 1. **Verify Configuration Values**: Double-check the values set for `UPLOAD_VIDEO_FILE_SIZE_LIMIT` and `NGINX_CLIENT_MAX_BODY_SIZE` in your `.env` file. Ensure they are correctly formatted and that the units are consistent. 2. **NGINX Configuration**: Make sure that the `NGINX_CLIENT_MAX_BODY_SIZE` is set correctly in your NGINX configuration file. Sometimes, changes in the `.env` file might not reflect if the NGINX configuration is not reloaded or if there are overrides elsewhere. 3. **Docker Resource Limits**: Check if there are any resource limits set on your Docker container that might be affecting the upload process. You might need to increase the memory or CPU limits. 4. **Logs and Error Messages**: Look into the logs for more detailed error messages that might give additional insights into why the file read is failing. 5. **Test with Different File Sizes**: Since a 700MB file uploaded successfully, try testing with files of varying sizes to pinpoint the threshold where the error occurs. These steps might help in diagnosing and resolving the issue. If the problem persists, consider providing more detailed logs or error messages for further assistance. <!-- 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/94eb782c-1fe2-4d6e-803d-e6867a71f96c?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/94eb782c-1fe2-4d6e-803d-e6867a71f96c?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/94eb782c-1fe2-4d6e-803d-e6867a71f96c?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/94eb782c-1fe2-4d6e-803d-e6867a71f96c?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/94eb782c-1fe2-4d6e-803d-e6867a71f96c?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/94eb782c-1fe2-4d6e-803d-e6867a71f96c?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/94eb782c-1fe2-4d6e-803d-e6867a71f96c?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Mar 24, 2025):

https://github.com/langgenius/dify/blob/0587eb49567b5f4bb7f9e1fe85a341a25aad0ccb/web/app/components/base/file-uploader/hooks.ts#L301-L307

The error is raised here. I think you might need to provide more debug information to reproduce this error.

@crazywoola commented on GitHub (Mar 24, 2025): https://github.com/langgenius/dify/blob/0587eb49567b5f4bb7f9e1fe85a341a25aad0ccb/web/app/components/base/file-uploader/hooks.ts#L301-L307 The error is raised here. I think you might need to provide more debug information to reproduce this error.
Author
Owner

@LostRod commented on GitHub (Mar 24, 2025):

Let me restate my process:
I modified the .env file under dify/docker, changing the following fields: UPLOAD_FILE_SIZE_LIMIT, UPLOAD_IMAGE_FILE_SIZE_LIMIT, UPLOAD_VIDEO_FILE_SIZE_LIMIT, UPLOAD_AUDIO_FILE_SIZE_LIMIT, WORKFLOW_FILE_UPLOAD_LIMIT, and NGINX_CLIENT_MAX_BODY_SIZE.
.env.txt
I used docker compose up -d to start it.
Then, I created a workflow as shown in the image:

Image

Image

Image}
Next, I uploaded a 2.49 GB video file.
Image
After clicking "Test Run," the following error occurred:

Image

@LostRod commented on GitHub (Mar 24, 2025): Let me restate my process: I modified the .env file under dify/docker, changing the following fields: UPLOAD_FILE_SIZE_LIMIT, UPLOAD_IMAGE_FILE_SIZE_LIMIT, UPLOAD_VIDEO_FILE_SIZE_LIMIT, UPLOAD_AUDIO_FILE_SIZE_LIMIT, WORKFLOW_FILE_UPLOAD_LIMIT, and NGINX_CLIENT_MAX_BODY_SIZE. [.env.txt](https://github.com/user-attachments/files/19440940/default.env.txt) I used docker compose up -d to start it. Then, I created a workflow as shown in the image: ![Image](https://github.com/user-attachments/assets/e3e63547-10ea-4514-8236-4a21553c312c) ![Image](https://github.com/user-attachments/assets/08db915c-6dba-4f9b-97d1-3dc50e86cfc1) ![Image](https://github.com/user-attachments/assets/ef77cdbc-05fb-4d5b-b188-246f0f1a567c)} Next, I uploaded a 2.49 GB video file. ![Image](https://github.com/user-attachments/assets/0202b42c-ed1d-406e-9152-18882419d3c3) After clicking "Test Run," the following error occurred: ![Image](https://github.com/user-attachments/assets/db454468-9e5b-4f9d-90fa-017d0b45852f)
Author
Owner

@LostRod commented on GitHub (Mar 24, 2025):

Sorry, I accidentally closed the issue.

@LostRod commented on GitHub (Mar 24, 2025): Sorry, I accidentally closed the issue.
Author
Owner

@dosubot[bot] commented on GitHub (Apr 25, 2025):

Hi, @LostRod. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • You reported a bug in the self-hosted Docker setup of Dify version 1.1.3 related to uploading a 2GB video file.
  • Despite modifying the .env file for larger file sizes, an error persists.
  • I suggested checking configuration values, NGINX settings, Docker resource limits, and logs.
  • Crazywoola pointed to a code section where the error might be raised and requested more debug information.
  • You provided additional setup details and the error encountered during a test run.

Next Steps:

  • Please confirm if this issue is still relevant to the latest version of the Dify repository by commenting here.
  • If no updates are provided, the issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Apr 25, 2025): Hi, @LostRod. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - You reported a bug in the self-hosted Docker setup of Dify version 1.1.3 related to uploading a 2GB video file. - Despite modifying the .env file for larger file sizes, an error persists. - I suggested checking configuration values, NGINX settings, Docker resource limits, and logs. - Crazywoola pointed to a code section where the error might be raised and requested more debug information. - You provided additional setup details and the error encountered during a test run. **Next Steps:** - Please confirm if this issue is still relevant to the latest version of the Dify repository by commenting here. - If no updates are provided, the issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12072