[DOCS]: url and upload_file_id do not have a strong dependency on transfer_method #194

Closed
opened 2026-02-16 05:19:25 -05:00 by yindo · 0 comments
Owner

Originally created by @zhangxuhe1 on GitHub (Jul 21, 2025).

Type of Documentation Change

Error/Typo fix

Documentation Page URL or Path

https://github.com/langgenius/dify-docs/blob/main/en/openapi_workflow.json

Current Content

The current en/openapi_workflow.json does not seem to fully implement the constraint semantics of url and upload_file_id in the https://github.com/langgenius/dify/blob/main/web/app/components/develop/template/template_workflow.en.mdx document.
The original mdx document describes them as follows:

  • transfer_method (string) Transfer method, remote_url for image URL / local_file for file upload
  • url (string) Image URL (when the transfer method is remote_url)
  • upload_file_id (string) Uploaded file ID, which must be obtained by uploading through the File Upload API in advance (when the transfer method is local_file)

However, oneOf in the JSON file seems to only implement "must provide url or upload_file_id", but does not establish a strong dependency with transfer_method:

      "InputFileObjectWorkflow": {
        "type": "object",
        "required": ["type", "transfer_method"],
        "properties": {
          "type": { "type": "string", "enum": ["document", "image", "audio", "video", "custom"], "description": "Type of file." },
          "transfer_method": { "type": "string", "enum": ["remote_url", "local_file"] },
          "url": { "type": "string", "format": "url", "description": "URL (if `remote_url`)." },
          "upload_file_id": { "type": "string", "description": "Uploaded file ID (if `local_file`)." }
        },
        "oneOf": [ {"required": ["url"]}, {"required": ["upload_file_id"]} ]
      },

Suggested Changes

I want to create a dependency between url and upload_file_id and transfer_method.

Reason for Change

Helps to align with the documentation description in https://github.com/langgenius/dify/blob/main/web/app/components/develop/template/template_workflow.en.mdx

Code of Conduct

Originally created by @zhangxuhe1 on GitHub (Jul 21, 2025). ### Type of Documentation Change Error/Typo fix ### Documentation Page URL or Path https://github.com/langgenius/dify-docs/blob/main/en/openapi_workflow.json ### Current Content The current en/openapi_workflow.json does not seem to fully implement the constraint semantics of url and upload_file_id in the https://github.com/langgenius/dify/blob/main/web/app/components/develop/template/template_workflow.en.mdx document. The original mdx document describes them as follows: - `transfer_method` (string) Transfer method, `remote_url` for image URL / `local_file` for file upload - `url` (string) Image URL (when the transfer method is `remote_url`) - `upload_file_id` (string) Uploaded file ID, which must be obtained by uploading through the File Upload API in advance (when the transfer method is `local_file`) However, oneOf in the JSON file seems to only implement "must provide url or upload_file_id", but does not establish a strong dependency with transfer_method: ``` "InputFileObjectWorkflow": { "type": "object", "required": ["type", "transfer_method"], "properties": { "type": { "type": "string", "enum": ["document", "image", "audio", "video", "custom"], "description": "Type of file." }, "transfer_method": { "type": "string", "enum": ["remote_url", "local_file"] }, "url": { "type": "string", "format": "url", "description": "URL (if `remote_url`)." }, "upload_file_id": { "type": "string", "description": "Uploaded file ID (if `local_file`)." } }, "oneOf": [ {"required": ["url"]}, {"required": ["upload_file_id"]} ] }, ``` ### Suggested Changes I want to create a dependency between url and upload_file_id and transfer_method. ### Reason for Change Helps to align with the documentation description in https://github.com/langgenius/dify/blob/main/web/app/components/develop/template/template_workflow.en.mdx ### Code of Conduct - [x] I agree to follow Dify's documentation [contribution guidelines](https://github.com/langgenius/dify/blob/0277a37fcad5ad86aeb239485c27fffd5cd90043/CONTRIBUTING.md)
yindo added the documentation label 2026-02-16 05:19:25 -05:00
yindo closed this issue 2026-02-16 05:19:25 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-docs#194