The modification of UPLOAD_FILE_SIZE_LIMIT has not taken effect? #7214

Closed
opened 2026-02-21 18:19:27 -05:00 by yindo · 2 comments
Owner

Originally created by @gongshaojie12 on GitHub (Dec 16, 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.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I want to increase the file upload size, but after modifying the UPLOAD_FILE_SIZE_LIMIT value to 1024, it hasn't taken effect and is still at the default value of 15. How can I modify it to make it work?

✔️ Expected Behavior

I hope to modify the file upload size limit.

Actual Behavior

I modified the UPLOAD_FILE_SIZE_LIMIT value to 1024, but it hasn't taken effect and is still at the default value of 15.

Originally created by @gongshaojie12 on GitHub (Dec 16, 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.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I want to increase the file upload size, but after modifying the UPLOAD_FILE_SIZE_LIMIT value to 1024, it hasn't taken effect and is still at the default value of 15. How can I modify it to make it work? ### ✔️ Expected Behavior I hope to modify the file upload size limit. ### ❌ Actual Behavior I modified the UPLOAD_FILE_SIZE_LIMIT value to 1024, but it hasn't taken effect and is still at the default value of 15.
yindo added the 🐞 bug label 2026-02-21 18:19:27 -05:00
yindo closed this issue 2026-02-21 18:19:27 -05:00
Author
Owner

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

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

To address the issue of the UPLOAD_FILE_SIZE_LIMIT not taking effect in your self-hosted Dify version 0.13.2 setup using Docker, follow these steps:

  1. Set the Environment Variable: Ensure that the UPLOAD_FILE_SIZE_LIMIT is set to 1024 in your .env file. Docker Compose will automatically use this value:

    UPLOAD_FILE_SIZE_LIMIT=1024
    
  2. Modify Docker Compose Configuration: Alternatively, you can directly modify the docker-compose.yaml file to set the value explicitly:

    UPLOAD_FILE_SIZE_LIMIT: 1024
    
  3. Restart Docker Containers: After making these changes, restart your Docker containers to apply the new configuration:

    docker-compose down
    docker-compose up -d
    

Additionally, ensure that the Nginx configuration is not limiting the upload size. The NGINX_CLIENT_MAX_BODY_SIZE should also be set to accommodate the new limit. You can check and modify this in the docker-compose.yaml file:

environment:
  NGINX_CLIENT_MAX_BODY_SIZE: 1024M

Restart the Nginx service if you make changes to its configuration. This should help in applying the new file size limit [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 16, 2024): <!-- Greeting --> @gongshaojie12 Hello there! I'm here to help you with any bugs, questions, or contributions while you wait for a human maintainer. Let's tackle this together! <!-- Answer --> To address the issue of the `UPLOAD_FILE_SIZE_LIMIT` not taking effect in your self-hosted Dify version 0.13.2 setup using Docker, follow these steps: 1. **Set the Environment Variable**: Ensure that the `UPLOAD_FILE_SIZE_LIMIT` is set to 1024 in your `.env` file. Docker Compose will automatically use this value: ``` UPLOAD_FILE_SIZE_LIMIT=1024 ``` 2. **Modify Docker Compose Configuration**: Alternatively, you can directly modify the `docker-compose.yaml` file to set the value explicitly: ```yaml UPLOAD_FILE_SIZE_LIMIT: 1024 ``` 3. **Restart Docker Containers**: After making these changes, restart your Docker containers to apply the new configuration: ```bash docker-compose down docker-compose up -d ``` Additionally, ensure that the Nginx configuration is not limiting the upload size. The `NGINX_CLIENT_MAX_BODY_SIZE` should also be set to accommodate the new limit. You can check and modify this in the `docker-compose.yaml` file: ```yaml environment: NGINX_CLIENT_MAX_BODY_SIZE: 1024M ``` Restart the Nginx service if you make changes to its configuration. This should help in applying the new file size limit <sup>[[1]](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/f8279b9e-3226-4dae-b5e2-07019a2f2dd9?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/f8279b9e-3226-4dae-b5e2-07019a2f2dd9?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/f8279b9e-3226-4dae-b5e2-07019a2f2dd9?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/f8279b9e-3226-4dae-b5e2-07019a2f2dd9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f8279b9e-3226-4dae-b5e2-07019a2f2dd9?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/f8279b9e-3226-4dae-b5e2-07019a2f2dd9?feedback_type=other)</sup>
Author
Owner

@gongshaojie12 commented on GitHub (Dec 16, 2024):

Thank you for your patient response. It works!

@gongshaojie12 commented on GitHub (Dec 16, 2024): Thank you for your patient response. It works!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7214