FILES_URL setting is not effective
Self Checks
- [X] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [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] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [X] Please do not modify this template :) and fill in all the required fields.
Dify version
0.6.13
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Dify is deployed on kubernetes and FILES_URL:dify.xxx.com is set.(at the same time, dify.xxx.com is the main entrance address of the dify system) However, when I upload a docx document, the path for uploading images is still 127.0.0.1:5000/files/xxxx. This results in the inability to display images normally outside the cluster when answering questions.
✔️ Expected Behavior
The image path prefix should be the same as the FILE_URL setting.
❌ Actual Behavior
FILES_URL setting is not effective,path is 127.0.0.1:5001.
https://github.com/langgenius/dify/blob/5e6fc58db3700214634fb6b43e373c165e5ec32f/api/configs/feature/init.py#L89-L96
@laipz8200
What do you mean by this?
However, when I upload a docx document, the path for uploading images is still 127.0.0.1:5000/files/xxxx. This results in the inability to display images normally outside the cluster when answering questions.
Why did you get an image after uploading an docx document?
Because the docx include image
What do you mean by this?
However, when I upload a docx document, the path for uploading images is still 127.0.0.1:5000/files/xxxx. This results in the inability to display images normally outside the cluster when answering questions.
Why did you get an image after uploading an docx document?
Because the document include some images
~See the PR.~
We use the CONSOLE_API_URL long time ago, so if you want to make things working, you should set the CONSOLE_API_URL and FILES_URL
~See the PR.~ We use the
CONSOLE_API_URLlong time ago, so if you want to make things working, you should set theCONSOLE_API_URLandFILES_URL
Actually, I have set CONSOLE_API_URL and FILES_URL to the same value, but it still doesn't work. Also, I set these two env in the api's Dockerfile, and once again in the pod.
~See the PR.~ We use the
CONSOLE_API_URLlong time ago, so if you want to make things working, you should set theCONSOLE_API_URLandFILES_URLActually, I have set CONSOLE_API_URL and FILES_URL to the same value, but it still doesn't work. Also, I set these two env in the api's Dockerfile, and once again in the pod.
I found that the docker env for web-api and web should have CONSOLE_API_URL set.
mee too problem!!!
i deploy dify with kubernetes too, the problem is also occurs do you have new solution way ?