dify - 💡(How to fix) Fix Invalid upload file error when triggering workflow with uploaded file via API (v1.14.0 & 1.14.1, Docker on Windows 11)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Workflow should run successfully with the uploaded file ID, no Invalid upload file error. But when I use this valid file ID to pass file parameters in the workflow run API request body to call the workflow, the system always returns 400 status code with error message Invalid upload file. In addition, manually uploading files and executing workflows on the Dify web frontend works totally fine without any error. This problem only occurs in the full API calling flow: API upload file + API trigger workflow.

RAW_BUFFERClick to expand / collapse

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.14.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

OS: Windows 11 Deployment: Docker Desktop + docker compose Docker version: 4.57.0 (215387) Dify versions: 1.14.0, 1.14.1

Describe the bug I can upload files successfully via the POST /v1/files/upload API When triggering a workflow via POST /v1/workflows/run with the returned upload_file_id, it always returns 400 Invalid upload file Multiple files (PDF) have been tested, all have the same issue This bug existed in v1.14.0 and was reported before, but was closed without being fixed; the bug still exists in v1.14.1 API Request & Response Details

  1. File upload (success) Endpoint: POST /v1/files/upload Response: json { "id": "5f4256c2-061a-4546-a98b-35ec136db138", "name": "XXX脱敏.pdf", "size": 332823, "extension": "pdf", "mime_type": "application/pdf", "created_by": "56c83078-85fd-44ef-af25-a83c967901d8", "created_at": 1779073853, "preview_url": null, "source_url": "/files/5f4256c2-061a-4546-a98b-35ec136db138/file-preview?timestamp=1779073853&nonce=6858e96afd33c0bda6fd616691274c51&sign=ugde5-tsh_eLtYouKeHe5rOHaidDhyRwKptBt1TwOhQ%3D", "original_url": null, "user_id": null, "tenant_id": "815c660c-72a8-44c6-a0ba-351ce74c1594", "conversation_id": null, "file_key": null }
  2. Workflow run (failed) Endpoint: POST /v1/workflows/run Request body: json { "inputs": { "shangchuan": { "transfer_method": "local_file", "upload_file_id": "5f4256c2-061a-4546-a98b-35ec136db138", "type": "document" }, "requirement": "总结" }, "response_mode": "blocking", "user": "rongjie" } Response: json { "code": "invalid_param", "message": "Invalid upload file", "status": 400 }

✔️ Expected Behavior

Workflow should run successfully with the uploaded file ID, no Invalid upload file error. This bug was not fixed in v1.14.0 and still persists in v1.14.1, please resolve it properly.

❌ Actual Behavior

After deploying Dify 1.14.0 and 1.14.1 using Docker Compose on Windows 11, I can successfully upload various PDF files through the official file upload API and get complete and valid file ID returned normally. But when I use this valid file ID to pass file parameters in the workflow run API request body to call the workflow, the system always returns 400 status code with error message Invalid upload file. I have verified that the file parameter structure, transfer method, file type and request format all fully comply with official API documentation standards. Multiple different PDF files are tested, and the failure phenomenon is completely consistent. In addition, manually uploading files and executing workflows on the Dify web frontend works totally fine without any error. This problem only occurs in the full API calling flow: API upload file + API trigger workflow. This defect already existed in version 1.14.0. I have submitted relevant issue before, however the issue was closed directly without any effective repair. Now the bug still persists in the newly released 1.14.1 version, which seriously affects the normal docking and use of external business systems via Dify open API.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

dify - 💡(How to fix) Fix Invalid upload file error when triggering workflow with uploaded file via API (v1.14.0 & 1.14.1, Docker on Windows 11)