When workflow is published as a tool, the start parameter has the function of uploading files. When calling the tool, the function of uploading files cannot be displayed normally, but the input box can be displayed #7069

Closed
opened 2026-02-21 18:18:42 -05:00 by yindo · 9 comments
Owner

Originally created by @lyz04551 on GitHub (Dec 5, 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.0

Cloud or Self Hosted

Cloud, Self Hosted (Docker)

Steps to reproduce

When workflow is published as a tool, the start parameter has the function of uploading files. When calling the tool, the function of uploading files cannot be displayed normally, but the input box can be displayed
Specific steps to reproduce:

  1. Add two variables at the beginning, one for the uploaded file and one for the input
    截屏2024-12-05 15 32 09
    截屏2024-12-05 15 33 33

  2. Publish this workflow as a tool,Tool input parameter selection user input
    截屏2024-12-05 15 34 36

  3. Create another workflow to call the tool just released
    截屏2024-12-05 15 36 49
    You can see that there is only an input box in the user input interface of the tool, and there is no option to upload a file. I am confused whether this is the design concept of dify or a defect. I personally feel that the behavior of each variable should be consistent.

✔️ Expected Behavior

I hope to be able to upload documents on the tool page

Actual Behavior

cann't upload file

Originally created by @lyz04551 on GitHub (Dec 5, 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.0 ### Cloud or Self Hosted Cloud, Self Hosted (Docker) ### Steps to reproduce When workflow is published as a tool, the start parameter has the function of uploading files. When calling the tool, the function of uploading files cannot be displayed normally, but the input box can be displayed Specific steps to reproduce: 1. Add two variables at the beginning, one for the uploaded file and one for the input <img width="1413" alt="截屏2024-12-05 15 32 09" src="https://github.com/user-attachments/assets/0e8eaa1b-55ff-400e-8d2b-0b268e620956"> <img width="552" alt="截屏2024-12-05 15 33 33" src="https://github.com/user-attachments/assets/08f552e3-95ee-4546-9785-371da83b6242"> 2. Publish this workflow as a tool,Tool input parameter selection user input <img width="629" alt="截屏2024-12-05 15 34 36" src="https://github.com/user-attachments/assets/57d22d1e-8541-491e-b481-fbc5a79aa383"> 3. Create another workflow to call the tool just released <img width="701" alt="截屏2024-12-05 15 36 49" src="https://github.com/user-attachments/assets/81194258-46c2-4613-9ef5-971fa32f990d"> You can see that there is only an input box in the user input interface of the tool, and there is no option to upload a file. I am confused whether this is the design concept of dify or a defect. I personally feel that the behavior of each variable should be consistent. ### ✔️ Expected Behavior I hope to be able to upload documents on the tool page ### ❌ Actual Behavior cann't upload file
yindo added the 🐞 bug label 2026-02-21 18:18:42 -05:00
yindo closed this issue 2026-02-21 18:18:42 -05:00
Author
Owner

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

@lyz04551 Hello! I'm here to help you with any bugs, questions, or contributions you have. Let's get this issue sorted out together!

There are two similar discussions related to file upload issues in Dify:

  1. Can not upload file in chat window [1].
  2. File upload in agents [2].

Regarding your issue, the file upload function might not display when calling a tool because it needs to be explicitly enabled in the application settings. Here are some steps to ensure file uploads are enabled:

  1. For Workflow Applications: Add file variables in the "Start Node" of your application. This allows users to upload files as part of the workflow. The file upload feature supports various file types, including documents, images, audio, and video.

  2. For ChatFlow Applications:

    • Enable the "File Upload" feature in the "Additional Features" section to allow direct file uploads in the chat window. Specify the file types you want to allow, such as images.
    • Add file variables in the "Start Node" if you want to handle file uploads through workflow logic.

These configurations are independent, so you can choose to enable file uploads in either or both methods depending on your application's needs [3].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Dec 5, 2024): <!-- Greeting --> @lyz04551 Hello! I'm here to help you with any bugs, questions, or contributions you have. Let's get this issue sorted out together! <!-- Answer --> There are two similar discussions related to file upload issues in Dify: 1. [Can not upload file in chat window](https://github.com/langgenius/dify/discussions/10782) <sup>[[1]](https://github.com/langgenius/dify/discussions/10782)</sup>. 2. [File upload in agents](https://github.com/langgenius/dify/discussions/10774) <sup>[[2]](https://github.com/langgenius/dify/discussions/10774)</sup>. Regarding your issue, the file upload function might not display when calling a tool because it needs to be explicitly enabled in the application settings. Here are some steps to ensure file uploads are enabled: 1. **For Workflow Applications**: Add file variables in the "Start Node" of your application. This allows users to upload files as part of the workflow. The file upload feature supports various file types, including documents, images, audio, and video. 2. **For ChatFlow Applications**: - Enable the "File Upload" feature in the "Additional Features" section to allow direct file uploads in the chat window. Specify the file types you want to allow, such as images. - Add file variables in the "Start Node" if you want to handle file uploads through workflow logic. These configurations are independent, so you can choose to enable file uploads in either or both methods depending on your application's needs <sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/file-upload.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

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

@dosu
thanks for your reply,can you help me check if the problem I reported is a defect or a design of dify,thanks a lot.

@lyz04551 commented on GitHub (Dec 8, 2024): @dosu thanks for your reply,can you help me check if the problem I reported is a defect or a design of dify,thanks a lot.
Author
Owner

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

The issue with the file upload function not displaying when calling a tool in Dify is an intentional design choice. The image upload feature has been integrated into a more comprehensive file upload capability, which supports various file types, including images. This change was made to avoid redundant features and improve the application experience. The standalone image upload feature is no longer recommended, and users are encouraged to use the file upload feature instead. This integration allows for a more versatile handling of different file types, enhancing the app's functionality and user experience [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 8, 2024): <!-- Answer --> The issue with the file upload function not displaying when calling a tool in Dify is an intentional design choice. The image upload feature has been integrated into a more comprehensive file upload capability, which supports various file types, including images. This change was made to avoid redundant features and improve the application experience. The standalone image upload feature is no longer recommended, and users are encouraged to use the file upload feature instead. This integration allows for a more versatile handling of different file types, enhancing the app's functionality and user experience <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/bulletin.md)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/jp/guides/workflow/bulletin.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/d7c185b1-1f3a-4f16-b379-a01203594cda?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/d7c185b1-1f3a-4f16-b379-a01203594cda?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/d7c185b1-1f3a-4f16-b379-a01203594cda?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/d7c185b1-1f3a-4f16-b379-a01203594cda?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d7c185b1-1f3a-4f16-b379-a01203594cda?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/d7c185b1-1f3a-4f16-b379-a01203594cda?feedback_type=other)</sup>
Author
Owner

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

@dosu
thanks,because I am doing some traditional workflow work, I want to upload a document when calling a tool. This tool is a sub-workflow generated locally. Is there any good method or suggestion, such as rolling back some previous versions? Or modifying some source code, etc.? Please give me some professional advice, thank you very much.
In addition, I have another question that is not related to the current issue. Is the maximum time for a node to run in a workflow an environment variable? When I run it, if I wait for more than 20 seconds, the node will automatically fail. Do you have any suggestions? Thanks a lot.

@lyz04551 commented on GitHub (Dec 8, 2024): @dosu thanks,because I am doing some traditional workflow work, I want to upload a document when calling a tool. This tool is a sub-workflow generated locally. Is there any good method or suggestion, such as rolling back some previous versions? Or modifying some source code, etc.? Please give me some professional advice, thank you very much. In addition, I have another question that is not related to the current issue. Is the maximum time for a node to run in a workflow an environment variable? When I run it, if I wait for more than 20 seconds, the node will automatically fail. Do you have any suggestions? Thanks a lot.
Author
Owner

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

Rolling back to a previous version of Dify to regain certain functionalities might not be the best approach, as it could introduce other issues or incompatibilities. Instead, consider modifying the source code to adjust the behavior of file uploads in workflows. Unfortunately, I don't have specific details on where to make these modifications in the source code, but you might want to explore the parts of the codebase related to workflow execution and file handling.

Regarding the maximum execution time for a node in a workflow, you can adjust this by modifying the TEXT_GENERATION_TIMEOUT_MS variable in the .env file. This setting controls the timeout for text generation tasks. Additionally, the WORKFLOW_MAX_EXECUTION_TIME parameter in the WorkflowConfig class sets the maximum execution time for a workflow, with a default value of 1200 seconds (20 minutes) [1][2]. If your node fails after 20 seconds, it might be due to a specific configuration or timeout setting that needs adjustment.

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 8, 2024): <!-- Answer --> Rolling back to a previous version of Dify to regain certain functionalities might not be the best approach, as it could introduce other issues or incompatibilities. Instead, consider modifying the source code to adjust the behavior of file uploads in workflows. Unfortunately, I don't have specific details on where to make these modifications in the source code, but you might want to explore the parts of the codebase related to workflow execution and file handling. Regarding the maximum execution time for a node in a workflow, you can adjust this by modifying the `TEXT_GENERATION_TIMEOUT_MS` variable in the `.env` file. This setting controls the timeout for text generation tasks. Additionally, the `WORKFLOW_MAX_EXECUTION_TIME` parameter in the `WorkflowConfig` class sets the maximum execution time for a workflow, with a default value of 1200 seconds (20 minutes) <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/configs/feature/__init__.py)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/getting-started/install-self-hosted/faqs.md)</sup>. If your node fails after 20 seconds, it might be due to a specific configuration or timeout setting that needs adjustment. <!-- 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/11a8a0b2-bc21-4a0b-af11-fba4678cdbe5?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/11a8a0b2-bc21-4a0b-af11-fba4678cdbe5?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/11a8a0b2-bc21-4a0b-af11-fba4678cdbe5?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/11a8a0b2-bc21-4a0b-af11-fba4678cdbe5?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/11a8a0b2-bc21-4a0b-af11-fba4678cdbe5?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/11a8a0b2-bc21-4a0b-af11-fba4678cdbe5?feedback_type=other)</sup>
Author
Owner

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

@dosu
thanks for your reply. If the tool interface supports uploading files, please remind me in time, thanks

@lyz04551 commented on GitHub (Dec 8, 2024): @dosu thanks for your reply. If the tool interface supports uploading files, please remind me in time, thanks
Author
Owner

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

@lyz04551 Hey there! I'm here to help with bugs, technical questions, and engineering knowledge. However, I can't keep track of future updates or changes to the tool interface. If you think I should be able to help with this, feel free to reach out to the Dosu Team. They'll be happy to hear your feedback! 😊

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 8, 2024): <!-- Answer --> @lyz04551 Hey there! I'm here to help with bugs, technical questions, and engineering knowledge. However, I can't keep track of future updates or changes to the tool interface. If you think I should be able to help with this, feel free to reach out to the [Dosu Team](mailto:customersuccess@dosu.dev). They'll be happy to hear your feedback! 😊 <!-- 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/b784172c-fb71-4f9f-9ef6-b44220e6861c?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/b784172c-fb71-4f9f-9ef6-b44220e6861c?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/b784172c-fb71-4f9f-9ef6-b44220e6861c?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/b784172c-fb71-4f9f-9ef6-b44220e6861c?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b784172c-fb71-4f9f-9ef6-b44220e6861c?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/b784172c-fb71-4f9f-9ef6-b44220e6861c?feedback_type=other)</sup>
Author
Owner

@lyz04551 commented on GitHub (Dec 10, 2024):

@dosu
I have a question to ask. When doing Question classification, can I only input one variable, which is the user's input? What should I do if I want to use multiple variables, that is, some variables generated by the workflow before to assist in deciding the classification results of LLM? Thanks

@lyz04551 commented on GitHub (Dec 10, 2024): @dosu I have a question to ask. When doing Question classification, can I only input one variable, which is the user's input? What should I do if I want to use multiple variables, that is, some variables generated by the workflow before to assist in deciding the classification results of LLM? Thanks
Author
Owner

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

To use multiple variables, including those generated earlier in a workflow, for question classification in Dify, you can follow these steps:

  1. Variable Insertion in Prompts: Use the variable insertion feature in the prompt editor of the LLM node. You can call the variable insertion menu by entering “/” or “{” to insert special variable blocks or upstream node variables into the prompt. This allows you to incorporate multiple variables into the LLM's decision-making process [1].

  2. Context Variables: Define context variables within the LLM node to insert externally retrieved text content into the prompt. This can include outputs from upstream nodes, such as knowledge retrieval nodes, which can be used to provide additional context for classification tasks [1].

  3. File and Conversation History Variables: If your workflow involves file content or conversation history, you can use file variables and conversation history variables to integrate this information into the LLM's processing [1].

By using these methods, you can effectively utilize multiple variables to assist in deciding the classification results of the LLM.

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 10, 2024): <!-- Answer --> To use multiple variables, including those generated earlier in a workflow, for question classification in Dify, you can follow these steps: 1. **Variable Insertion in Prompts**: Use the variable insertion feature in the prompt editor of the LLM node. You can call the variable insertion menu by entering “/” or “{” to insert special variable blocks or upstream node variables into the prompt. This allows you to incorporate multiple variables into the LLM's decision-making process <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/node/llm.md)</sup>. 2. **Context Variables**: Define context variables within the LLM node to insert externally retrieved text content into the prompt. This can include outputs from upstream nodes, such as knowledge retrieval nodes, which can be used to provide additional context for classification tasks <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/node/llm.md)</sup>. 3. **File and Conversation History Variables**: If your workflow involves file content or conversation history, you can use file variables and conversation history variables to integrate this information into the LLM's processing <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/node/llm.md)</sup>. By using these methods, you can effectively utilize multiple variables to assist in deciding the classification results of the LLM. <!-- 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/9711f5f2-2dd9-4c31-8eb1-2e4b2fdea65e?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/9711f5f2-2dd9-4c31-8eb1-2e4b2fdea65e?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/9711f5f2-2dd9-4c31-8eb1-2e4b2fdea65e?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/9711f5f2-2dd9-4c31-8eb1-2e4b2fdea65e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9711f5f2-2dd9-4c31-8eb1-2e4b2fdea65e?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/9711f5f2-2dd9-4c31-8eb1-2e4b2fdea65e?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7069