Custom Tools With multipart/forms Content
Self Checks
- [X] I have searched for existing issues search for existing issues, including closed ones.
- [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [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 built a custom tool which allows upload file to the API. I tested in PostMan, it's working as expected. When I trying to call the API in Dify workflow, it fails the request with response "415". Screenshot as below:
I seems Dify custom tools only accept json format request body, I'd like to see it accept uploaded files as well.
2. Additional context or comments
Postman request:
curl --request POST \
--url http://localhost:5000/documents \
--header 'Authorization: Bearer app-xxxx' \
--header 'Content-Type: multipart/form-data' \
--form '[email protected]' \
--form type=upload
My workflow for your reference:
3. Can you help us with this feature?
- [ ] I am interested in contributing to this feature.
Hi, @thiner. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.
Issue Summary:
- You encountered a "415" error when using a custom tool for file uploads in a Dify workflow.
- The tool works in Postman, indicating a potential issue with Dify's support for request body formats.
- You requested support for multipart/form-data to enable file uploads in Dify workflows.
- There have been no further comments or developments on this issue.
Next Steps:
- Please confirm if this issue is still relevant with the latest version of the Dify repository by commenting here.
- If there is no further activity, this issue will be automatically closed in 15 days.
Thank you for your understanding and contribution!
Yes, the new version still not supporting multipart/form-data content type.
@takatost, the user @thiner has confirmed that the new version still does not support the multipart/form-data content type for file uploads in Dify workflows. Could you please assist them with this issue?