Replies: 3 comments 1 reply
-
Hi @wuyufu0! I'm Dosu and I’m helping the dify team. You can upload 2 strings and 1 file simultaneously in a Dify workflow using the HTTP Request node by setting the method to POST, adding an Authorization header, and choosing "form-data" as the body type. In the body, add a field of type "file" for your file, and fields of type "text" for your string values (for example, a "data" field containing JSON or separate fields for each string) cite. Note that files larger than 800KB are not supported in the HTTP Request node; for larger files, use a Python code node instead cite. Alternatively, you can first upload the file to Dify (using the If you need to handle multiple files, use an iteration node or code node to process each file individually, as the HTTP Request node only supports single file uploads cite. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
@dosu |
Beta Was this translation helpful? Give feedback.
-
In the first method you mentioned, regardless of whether I set the Content-Type to multipart/form-data (I've tried both uppercase and lowercase versions), the Content-Type in the output is always application/json, which results in a 415 error. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
Content
How to call a workflow that requires 2 strings and 1 file as inputs by uploading files and values simultaneously via the "HTTP Request" node in a Dify conversation flow, or are there any other solutions?
Beta Was this translation helpful? Give feedback.
All reactions