Failed to execute the workflow using Postman. #13506

Closed
opened 2026-02-21 19:12:26 -05:00 by yindo · 4 comments
Owner

Originally created by @mzh160 on GitHub (Apr 28, 2025).

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

1.2.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image

Image

I referred to the following code to send a request using Postman, first uploading the audio through /upload, and then using /run to execute the workflow. However, an error occurred:
{"code": "invalid_param","message": "audio in input form must be a file","status": 400}

✔️ Expected Behavior

The audio file is successfully uploaded and the workflow is executed

Actual Behavior

No response

Originally created by @mzh160 on GitHub (Apr 28, 2025). ### 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 1.2.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/9b7955a2-9a74-4ce3-b75e-28c247c42254) ![Image](https://github.com/user-attachments/assets/b178a614-2129-40c7-ba08-1b284fcae650) I referred to the following code to send a request using Postman, first uploading the audio through /upload, and then using /run to execute the workflow. However, an error occurred: {"code": "invalid_param","message": "audio in input form must be a file","status": 400} ### ✔️ Expected Behavior The audio file is successfully uploaded and the workflow is executed ### ❌ Actual Behavior _No response_
yindo added the 🙋‍♂️ question label 2026-02-21 19:12:26 -05:00
yindo closed this issue 2026-02-21 19:12:26 -05:00
Author
Owner

@mzh160 commented on GitHub (Apr 28, 2025):

Image
I refer to this code, should I upload the audio first and then call the uploaded file by id, right?

@mzh160 commented on GitHub (Apr 28, 2025): ![Image](https://github.com/user-attachments/assets/a8a1cc96-71ec-40fb-b775-182afb0c8aea) I refer to this code, should I upload the audio first and then call the uploaded file by id, right?
Author
Owner

@dosubot[bot] commented on GitHub (Apr 28, 2025):

Hello @mzh160! I'm Dosu, your friendly bot here to help you with bugs, questions, and contributing to the project. While you wait for a human maintainer, feel free to ask me anything! 😊

I found a similar discussion that might be relevant to your issue: Help, which is currently unsolved [1].

To address the "invalid_param" error stating "audio in input form must be a file," ensure that you are correctly uploading the file and referencing it in your workflow execution. Here are the steps you should follow:

  1. Upload the File Correctly: When uploading the file using the /v1/files/upload endpoint, make sure you are using multipart/form-data as the Content-Type. The file should be uploaded as binary data, not as a JSON object.

  2. Reference the File by ID: After successfully uploading the file, you will receive a response containing the file ID. Use this ID in your workflow execution request.

  3. Ensure Proper Request Structure: When executing the workflow using the /v1/workflows/run endpoint, ensure that the request is structured correctly. The inputs object should include the file ID and specify the transfer_method as local_file.

By following these steps, you should be able to avoid the "invalid_param" error and successfully execute the workflow.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Apr 28, 2025): <!-- Greeting --> Hello @mzh160! I'm [Dosu](https://dosu.dev), your friendly bot here to help you with bugs, questions, and contributing to the project. While you wait for a human maintainer, feel free to ask me anything! 😊 <!-- Answer --> I found a similar discussion that might be relevant to your issue: [Help](https://github.com/langgenius/dify/discussions/13599), which is currently unsolved <sup>[[1]](https://github.com/langgenius/dify/discussions/13599)</sup>. To address the "invalid_param" error stating "audio in input form must be a file," ensure that you are correctly uploading the file and referencing it in your workflow execution. Here are the steps you should follow: 1. **Upload the File Correctly**: When uploading the file using the `/v1/files/upload` endpoint, make sure you are using `multipart/form-data` as the Content-Type. The file should be uploaded as binary data, not as a JSON object. 2. **Reference the File by ID**: After successfully uploading the file, you will receive a response containing the file ID. Use this ID in your workflow execution request. 3. **Ensure Proper Request Structure**: When executing the workflow using the `/v1/workflows/run` endpoint, ensure that the request is structured correctly. The `inputs` object should include the file ID and specify the `transfer_method` as `local_file`. By following these steps, you should be able to avoid the "invalid_param" error and successfully execute the workflow. <!-- 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/c59f2149-18a5-49e7-8a60-54f075aa42d9?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/c59f2149-18a5-49e7-8a60-54f075aa42d9?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/c59f2149-18a5-49e7-8a60-54f075aa42d9?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/c59f2149-18a5-49e7-8a60-54f075aa42d9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c59f2149-18a5-49e7-8a60-54f075aa42d9?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/c59f2149-18a5-49e7-8a60-54f075aa42d9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c59f2149-18a5-49e7-8a60-54f075aa42d9?feedback_type=other)</sup>
Author
Owner

@mzh160 commented on GitHub (Apr 28, 2025):

Hello @mzh160! I'm Dosu, your friendly bot here to help you with bugs, questions, and contributing to the project. While you wait for a human maintainer, feel free to ask me anything! 😊

I found a similar discussion that might be relevant to your issue: Help, which is currently unsolved [1].

To address the "invalid_param" error stating "audio in input form must be a file," ensure that you are correctly uploading the file and referencing it in your workflow execution. Here are the steps you should follow:

  1. Upload the File Correctly: When uploading the file using the /v1/files/upload endpoint, make sure you are using multipart/form-data as the Content-Type. The file should be uploaded as binary data, not as a JSON object.
  2. Reference the File by ID: After successfully uploading the file, you will receive a response containing the file ID. Use this ID in your workflow execution request.
  3. Ensure Proper Request Structure: When executing the workflow using the /v1/workflows/run endpoint, ensure that the request is structured correctly. The inputs object should include the file ID and specify the transfer_method as local_file.

By following these steps, you should be able to avoid the "invalid_param" error and successfully execute the workflow.

To continue talking to Dosu, mention @dosu.

Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

{
"inputs": {
"audio":
[
{
"transfer_method": "local_file",
"upload_file_id": "763468db-8e3e-45cd-a1d3-a8e94df3d64e",
"type": "audio"
}
]
},
"response_mode": "blocking",
"user": "mzh123"
}
I successfully uploaded the audio file via http://127.0.0.1/v1/files/upload and used the id of the audio file in the http://127.0.0.1/v1/workflows/run, Just like the code above, but returned {
"code": "invalid_param",
"message": "audio in input form must be a file",
"status": 400
}

@mzh160 commented on GitHub (Apr 28, 2025): > Hello [@mzh160](https://github.com/mzh160)! I'm [Dosu](https://dosu.dev), your friendly bot here to help you with bugs, questions, and contributing to the project. While you wait for a human maintainer, feel free to ask me anything! 😊 > > I found a similar discussion that might be relevant to your issue: [Help](https://github.com/langgenius/dify/discussions/13599), which is currently unsolved [[1]](https://github.com/langgenius/dify/discussions/13599). > > To address the "invalid_param" error stating "audio in input form must be a file," ensure that you are correctly uploading the file and referencing it in your workflow execution. Here are the steps you should follow: > > 1. **Upload the File Correctly**: When uploading the file using the `/v1/files/upload` endpoint, make sure you are using `multipart/form-data` as the Content-Type. The file should be uploaded as binary data, not as a JSON object. > 2. **Reference the File by ID**: After successfully uploading the file, you will receive a response containing the file ID. Use this ID in your workflow execution request. > 3. **Ensure Proper Request Structure**: When executing the workflow using the `/v1/workflows/run` endpoint, ensure that the request is structured correctly. The `inputs` object should include the file ID and specify the `transfer_method` as `local_file`. > > By following these steps, you should be able to avoid the "invalid_param" error and successfully execute the workflow. > > _To continue talking to [Dosu](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/c59f2149-18a5-49e7-8a60-54f075aa42d9?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/c59f2149-18a5-49e7-8a60-54f075aa42d9?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/c59f2149-18a5-49e7-8a60-54f075aa42d9?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/c59f2149-18a5-49e7-8a60-54f075aa42d9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c59f2149-18a5-49e7-8a60-54f075aa42d9?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/c59f2149-18a5-49e7-8a60-54f075aa42d9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c59f2149-18a5-49e7-8a60-54f075aa42d9?feedback_type=other) { "inputs": { "audio": [ { "transfer_method": "local_file", "upload_file_id": "763468db-8e3e-45cd-a1d3-a8e94df3d64e", "type": "audio" } ] }, "response_mode": "blocking", "user": "mzh123" } I successfully uploaded the audio file via http://127.0.0.1/v1/files/upload and used the id of the audio file in the http://127.0.0.1/v1/workflows/run, Just like the code above, but returned { "code": "invalid_param", "message": "audio in input form must be a file", "status": 400 }
Author
Owner

@Danrry1996 commented on GitHub (Jun 17, 2025):

单文件中括号[ ]去掉就好了

@Danrry1996 commented on GitHub (Jun 17, 2025): 单文件中括号[ ]去掉就好了
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13506