how to use file upload API #20161

Closed
opened 2026-02-21 20:06:07 -05:00 by yindo · 3 comments
Owner

Originally created by @fanfan-lucky on GitHub (Nov 5, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

I use "curl -X POST 'http://10.9.11.30/v1/files/upload'" to get the uploaded file ID, I want to transfer this file to dify node "document extractor" in workflow, how can I implement this feature?

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @fanfan-lucky on GitHub (Nov 5, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [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, otherwise it will be closed. - [x] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. I use "curl -X POST 'http://10.9.11.30/v1/files/upload'" to get the uploaded file ID, I want to transfer this file to dify node "document extractor" in workflow, how can I implement this feature? ### 2. Additional context or comments _No response_ ### 3. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo added the 🙋‍♂️ question label 2026-02-21 20:06:07 -05:00
yindo closed this issue 2026-02-21 20:06:07 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 5, 2025):

To use the file upload API and pass the uploaded file to the "document extractor" node in a Dify workflow:

  1. Upload your file using the /v1/files/upload endpoint (as you are already doing). The response will include a unique file ID and metadata for the uploaded file example.
  2. When triggering your workflow (e.g., via the /workflows/<workflow_id>/run API), include the uploaded file ID in the inputs dictionary. The key should match the file variable name you configured in your workflow's Start node example.
  3. In your workflow, make sure the Start node has a file variable (single file or file list). Connect this variable as the input to your "document extractor" node. The extractor will then process the file referenced by the ID you provided guide.

Example flow:

  • Upload file → get file ID (e.g., abc123)
  • Run workflow with:
    {
      "inputs": {
        "your_file_variable_name": "abc123"
      }
    }
    
  • The "document extractor" node uses this variable to access and process the file.

For more details and screenshots, see the official file upload workflow guide.

Let me know if you need a concrete API example or more details on workflow configuration!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Nov 5, 2025): <!-- Answer --> To use the file upload API and pass the uploaded file to the "document extractor" node in a Dify workflow: 1. Upload your file using the `/v1/files/upload` endpoint (as you are already doing). The response will include a unique file ID and metadata for the uploaded file [example](https://github.com/langgenius/dify/blob/97a2e2ec2e30b385138ab84f3809941b8024d9b2/api/controllers/files/upload.py#L20-L122). 2. When triggering your workflow (e.g., via the `/workflows/<workflow_id>/run` API), include the uploaded file ID in the `inputs` dictionary. The key should match the file variable name you configured in your workflow's Start node [example](https://github.com/langgenius/dify/blob/97a2e2ec2e30b385138ab84f3809941b8024d9b2/api/controllers/service_api/app/workflow.py#L45-L248). 3. In your workflow, make sure the Start node has a file variable (single file or file list). Connect this variable as the input to your "document extractor" node. The extractor will then process the file referenced by the ID you provided [guide](https://github.com/langgenius/dify-docs/blob/d0c4170710499da3b9b62d3df9391fb2e61be0a7/en/guides/workflow/file-upload.mdx#L40-L160). **Example flow:** - Upload file → get file ID (e.g., `abc123`) - Run workflow with: ```json { "inputs": { "your_file_variable_name": "abc123" } } ``` - The "document extractor" node uses this variable to access and process the file. For more details and screenshots, see the official [file upload workflow guide](https://github.com/langgenius/dify-docs/blob/d0c4170710499da3b9b62d3df9391fb2e61be0a7/en/guides/workflow/file-upload.mdx#L40-L160). Let me know if you need a concrete API example or more details on workflow configuration! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/7884b47c-8629-47aa-8449-d105ad189a38?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/7884b47c-8629-47aa-8449-d105ad189a38?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/7884b47c-8629-47aa-8449-d105ad189a38?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/7884b47c-8629-47aa-8449-d105ad189a38?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/7884b47c-8629-47aa-8449-d105ad189a38?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/7884b47c-8629-47aa-8449-d105ad189a38?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/7884b47c-8629-47aa-8449-d105ad189a38?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/27880)
Author
Owner

@fanfan-lucky commented on GitHub (Nov 5, 2025):

@dosu. please give me more details

@fanfan-lucky commented on GitHub (Nov 5, 2025): [@dosu](https://go.dosu.dev/dosubot). please give me more details
Author
Owner

@dosubot[bot] commented on GitHub (Nov 5, 2025):

Here are more details about Dosu's capabilities and how it integrates with workflows:

Dosu is an AI-powered documentation platform that automatically extracts and maintains up-to-date technical knowledge from your codebase, conversations, and tickets. It generates topics, templates, and reports, and can publish documentation to tools like GitHub, Confluence, and Notion. Dosu supports answer retrieval, audience-specific content, multi-channel updates, versioning, and proactively identifies documentation gaps. It’s designed to enhance team onboarding, cross-team collaboration, and AI agent knowledge bases, all with SOC 2 Type II security and privacy assurances—Dosu does not train on private data, keeping your information secure cite cite.

Dosu integrates seamlessly into engineering and product workflows, reducing manual documentation effort and keeping knowledge current across teams. It helps automate updates, adapts content for different audiences, and supports publishing to multiple channels. This means less time spent on Q&A and stale docs, and more efficient onboarding and collaboration for both humans and AI agents.

If you need specifics about how Dosu connects to your workflow or want example integrations, let me know your use case or target platform (e.g., GitHub, Notion), and I can provide more targeted details.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Nov 5, 2025): <!-- Answer --> Here are more details about Dosu's capabilities and how it integrates with workflows: Dosu is an AI-powered documentation platform that automatically extracts and maintains up-to-date technical knowledge from your codebase, conversations, and tickets. It generates topics, templates, and reports, and can publish documentation to tools like GitHub, Confluence, and Notion. Dosu supports answer retrieval, audience-specific content, multi-channel updates, versioning, and proactively identifies documentation gaps. It’s designed to enhance team onboarding, cross-team collaboration, and AI agent knowledge bases, all with SOC 2 Type II security and privacy assurances—Dosu does not train on private data, keeping your information secure [cite](https://github.com/langgenius/dify/issues/25598) [cite](https://github.com/langgenius/dify/issues/25638). Dosu integrates seamlessly into engineering and product workflows, reducing manual documentation effort and keeping knowledge current across teams. It helps automate updates, adapts content for different audiences, and supports publishing to multiple channels. This means less time spent on Q&A and stale docs, and more efficient onboarding and collaboration for both humans and AI agents. If you need specifics about how Dosu connects to your workflow or want example integrations, let me know your use case or target platform (e.g., GitHub, Notion), and I can provide more targeted details. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/c81b5ce8-ce95-4ab5-93df-0f5ca238887c?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/c81b5ce8-ce95-4ab5-93df-0f5ca238887c?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/c81b5ce8-ce95-4ab5-93df-0f5ca238887c?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/c81b5ce8-ce95-4ab5-93df-0f5ca238887c?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c81b5ce8-ce95-4ab5-93df-0f5ca238887c?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/c81b5ce8-ce95-4ab5-93df-0f5ca238887c?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c81b5ce8-ce95-4ab5-93df-0f5ca238887c?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/27880)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20161