Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Validation Failed Error for Uploaded Remote Image #13285

Closed
5 tasks done
le0zh opened this issue Feb 6, 2025 · 1 comment · Fixed by #13286
Closed
5 tasks done

File Validation Failed Error for Uploaded Remote Image #13285

le0zh opened this issue Feb 6, 2025 · 1 comment · Fixed by #13286
Labels
🐞 bug Something isn't working cloud When the version is cloud and it is a bug report

Comments

@le0zh
Copy link
Contributor

le0zh commented Feb 6, 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

0.15.2

Cloud or Self Hosted

Cloud

Steps to reproduce

  1. Set Upload Method as the only Upload Method
    Image

  2. Send a message with image
    Image

✔️ Expected Behavior

No error.

❌ Actual Behavior

Image

@dosubot dosubot bot added cloud When the version is cloud and it is a bug report 🐞 bug Something isn't working labels Feb 6, 2025
Copy link

dosubot bot commented Feb 6, 2025

Hello @le0zh! I'm here to help you with any bugs, questions, or contributions you may have. Let's work together to solve the issue you're facing. If you need any assistance, feel free to ask.

I found a similar closed issue titled "[bug]upload file error" that might be relevant to your situation. This issue was resolved by a pull request that provided full support for opendal and synchronized configurations between .env and docker-compose [1].

For your specific case, in Dify version 0.15.2, ensure that when using the Workflow API's /workflows/run endpoint, you specify the file type as 'custom' for remote image uploads. This is part of the new "File Upload" feature, which supports various file types, including images. Here's how you should specify the file type:

{
  'inputs': {
    'doc': {
      'type': 'custom',
      'transfer_method': 'remote_url',
      'url': 'your-file-url'
    }
  }
}

Make sure the remote_url is a valid URL starting with "http" and is not None [2][3].

To continue talking to Dosu, mention @dosu.


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working cloud When the version is cloud and it is a bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant