Skip to content

"1 validation error for File\n Value error, Invalid file url [type=value_error, input_value={'id': None, 'tenant_id':...y__file__', 'url': None}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.9/v/value_error" #18866

New issue

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

By clicking “No 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? No Sign in to your account

Open
5 tasks done
by-Cici opened this issue Apr 27, 2025 · 2 comments
Labels
🐞 bug Something isn't working 🌚 invalid This doesn't seem right

Comments

@by-Cici
Copy link

by-Cici commented Apr 27, 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.1.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

An error will be reported when using the link method to upload files.
Image

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

Copy link

dosubot bot commented Apr 27, 2025

Hello @by-Cici! I'm Dosu, a bot here to help you tackle bugs, answer your questions, and guide you on your journey to becoming a contributor. While you wait for a human maintainer, feel free to share any details or ask for assistance!

To resolve the "Invalid file url" validation error when using the link method to upload files in a self-hosted Dify version 1.1.2 setup, follow these steps:

  1. Edit the docker/.env file in your self-hosted Docker environment.
  2. Locate the FILES_URL configuration.
  3. Set FILES_URL to your Dify access address, such as http://192.168.10.14/ or http://192.168.10.14:port if using a non-standard port.
  4. Execute docker-compose down && docker-compose up -d to apply the changes.

Additional requirements to ensure success:

  • Use the actual intranet IP instead of localhost.
  • Disable any proxy software during testing.
  • Ensure URLs do not contain spaces, as spaces in the URL can cause the "Invalid file URL" error.
  • Verify that URLs start with 'http'.
  • Ensure to restart Docker services after making changes.

Note: If you are using OpenRouter models (like GPT-4o), be aware that there is a known compatibility issue with the OpenRouter plugin that can cause image uploads to fail with a 400 error indicating an invalid file URL. This issue is specific to the OpenRouter plugin integration and may require additional troubleshooting or updates from the plugin provider [1][2][3][4].

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 dosubot bot added the 🐞 bug Something isn't working label Apr 27, 2025
@crazywoola
Copy link
Member

Please provide the details of the model and the plugin version.

@crazywoola crazywoola added the 🌚 invalid This doesn't seem right label Apr 27, 2025
No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
🐞 bug Something isn't working 🌚 invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants