File Upload Failures Persist Until NGINX_CLIENT_MAX_BODY_SIZE Is Adjusted Alongside .env Configuration #7895

Closed
opened 2026-02-21 18:22:56 -05:00 by yindo · 3 comments
Owner

Originally created by @kevintsai1202 on GitHub (Jan 25, 2025).

Originally assigned to: @crazywoola on GitHub.

Self Checks

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

Provide a description of requested docs changes

After adjusting the file size limits in the .env file, uploads still failed with errors. The issue was resolved only after modifying the NGINX_CLIENT_MAX_BODY_SIZE configuration.

Recommendation:
The "Environment Variables Explanation" documentation should explicitly note that in addition to the following parameters affecting file upload limits:
UPLOAD_FILE_SIZE_LIMIT
UPLOAD_IMAGE_FILE_SIZE_LIMIT
UPLOAD_VIDEO_FILE_SIZE_LIMIT
UPLOAD_AUDIO_FILE_SIZE_LIMIT
WORKFLOW_FILE_UPLOAD_LIMIT

the NGINX_CLIENT_MAX_BODY_SIZE must also be adjusted accordingly. Failure to update this Nginx parameter may result in persistent upload errors, even if other limits are correctly configured.

Image
Image
Image

Originally created by @kevintsai1202 on GitHub (Jan 25, 2025). Originally assigned to: @crazywoola on GitHub. ### Self Checks - [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 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. ### Provide a description of requested docs changes After adjusting the file size limits in the .env file, uploads still failed with errors. The issue was resolved only after modifying the NGINX_CLIENT_MAX_BODY_SIZE configuration. Recommendation: The "Environment Variables Explanation" documentation should explicitly note that in addition to the following parameters affecting file upload limits: UPLOAD_FILE_SIZE_LIMIT UPLOAD_IMAGE_FILE_SIZE_LIMIT UPLOAD_VIDEO_FILE_SIZE_LIMIT UPLOAD_AUDIO_FILE_SIZE_LIMIT WORKFLOW_FILE_UPLOAD_LIMIT the NGINX_CLIENT_MAX_BODY_SIZE must also be adjusted accordingly. Failure to update this Nginx parameter may result in persistent upload errors, even if other limits are correctly configured. ![Image](https://github.com/user-attachments/assets/14717573-7316-44f1-b7c3-fc481afacb95) ![Image](https://github.com/user-attachments/assets/473dd793-e7bb-430c-9de7-3b84aa60e058) ![Image](https://github.com/user-attachments/assets/a9a39b50-e442-432b-b597-47a153f42315)
yindo added the 📚 documentation label 2026-02-21 18:22:56 -05:00
yindo closed this issue 2026-02-21 18:22:56 -05:00
Author
Owner

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

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

Issue Summary

  • File uploads were failing despite adjusting size limits in the .env file.
  • Resolution involved changing the NGINX_CLIENT_MAX_BODY_SIZE configuration.
  • You suggested updating the documentation to include this information.
  • No additional comments or activities have been made on this issue.

Next Steps

  • Is this issue still relevant to the latest version of the Dify repository? If so, please comment to keep the discussion open.
  • Otherwise, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Feb 26, 2025): Hi, @kevintsai1202. 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** - File uploads were failing despite adjusting size limits in the .env file. - Resolution involved changing the NGINX_CLIENT_MAX_BODY_SIZE configuration. - You suggested updating the documentation to include this information. - No additional comments or activities have been made on this issue. **Next Steps** - Is this issue still relevant to the latest version of the Dify repository? If so, please comment to keep the discussion open. - Otherwise, this issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Author
Owner

@kevintsai1202 commented on GitHub (Feb 26, 2025):

This issue only hopes to update the documentation, so that others know that the NGINX_CLIENT_MAX_BODY_SIZE parameter also needs to be adjusted together to change the file upload limit

@kevintsai1202 commented on GitHub (Feb 26, 2025): This issue only hopes to update the documentation, so that others know that the NGINX_CLIENT_MAX_BODY_SIZE parameter also needs to be adjusted together to change the file upload limit
Author
Owner

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

Thank you for your response, @kevintsai1202! We appreciate your suggestion to update the documentation regarding the NGINX_CLIENT_MAX_BODY_SIZE parameter. We'll go ahead and close this issue, but your feedback will be taken into consideration for future updates.

@dosubot[bot] commented on GitHub (Feb 26, 2025): Thank you for your response, @kevintsai1202! We appreciate your suggestion to update the documentation regarding the NGINX_CLIENT_MAX_BODY_SIZE parameter. We'll go ahead and close this issue, but your feedback will be taken into consideration for future updates.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7895