mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-07-22 04:15:24 -04:00
[DOCS]: Why can't files be downloaded after the update? #245
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zzzhhhlll on GitHub (Sep 28, 2025).
Type of Documentation Change
Error/Typo fix
Documentation Page URL or Path
No response
Current Content
Suggested Changes
no
Reason for Change
No response
Code of Conduct
@dosubot[bot] commented on GitHub (Sep 28, 2025):
Hi @zzzhhhlll! I'm Dosu and I’m helping the dify-docs team.
The reason files can't be downloaded after the update is that the file URLs generated by the markdown to Word plugin (and similar tools) use the FILES_URL environment variable from your Dify
.envfile. If FILES_URL is set tohttp://api:5001, this only works inside the Docker network—not from your browser—so you get a DNS resolution error like DNS_PROBE_FINISHED_NXDOMAIN when clicking the link.To fix this, set FILES_URL to a fully-qualified URL that your browser can access, such as
http://localhost:5001or your server's IP address (e.g.,http://192.168.x.x:5001), then restart your Docker containers. This will ensure download links work correctly outside Docker. More details and examples are in this issue and the plugin documentation.This is a configuration issue, not a bug in the plugin or a breaking code change.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@zzzhhhlll commented on GitHub (Sep 28, 2025):
I have changed the URLs in the .env file and the yaml file to http://localhost:5001/, but the file still cannot be downloaded after running. Upon tracking, I noticed that the URL still starts with http://api:5001/files/tools. I have also restarted Docker, but the issue persists. How should I configure this?
@dosubot[bot] commented on GitHub (Sep 28, 2025):
Your issue is caused by the INTERNAL_FILES_URL environment variable, which takes precedence over FILES_URL for file URLs in Dify (since v1.7.1). If INTERNAL_FILES_URL is set (often to http://api:5001), Dify will generate internal Docker URLs that aren't accessible from your browser, even if you change FILES_URL and restart Docker.
To fix this, open your docker/.env (or wherever your environment variables are set), and make sure INTERNAL_FILES_URL is unset or left blank. Set FILES_URL to your actual host IP and port (not localhost or api), for example:
FILES_URL=http://192.168.x.x:5001. Then run a full restart:docker-compose down && docker-compose up -dto reload the config.If you still see internal URLs, double-check which .env file Docker Compose is using, and inspect your running containers with
docker exec <container> envto confirm the correct values are loaded. More details are in this issue and here.Let me know if you need help with a specific config or want troubleshooting steps for your setup.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@zzzhhhlll commented on GitHub (Sep 28, 2025):
Because I'm doing a local deployment, I want to change it to http://localhost:5001/, but even after changing it to http://localhost:5001/, it still can't be downloaded.
@dosubot[bot] commented on GitHub (Sep 28, 2025):
The reason you still see file URLs like
http://api:5001/...is because the INTERNAL_FILES_URL environment variable takes precedence over FILES_URL in Dify. If INTERNAL_FILES_URL is set (even if you change FILES_URL and restart Docker), Dify will generate internal Docker URLs that aren't accessible from your browser details.To fix this for local deployment, open your
.envfile and make sure INTERNAL_FILES_URL is unset or left blank. Set FILES_URL to your host's LAN IP and port (for example,FILES_URL=http://192.168.x.x:5001), notlocalhost—because inside Docker,localhostrefers to the container itself, not your host machine reference. Then run a full restart:docker-compose down && docker-compose up -d.After restarting, check that your containers are using the correct environment variables with
docker exec <container> env. Try accessing the file URL directly from your browser to confirm it's reachable.If downloads still fail, double-check your Docker port mapping, firewall settings, and volume permissions. You can use an IP address with a port for FILES_URL—there’s no requirement for a domain name example.
Leaving INTERNAL_FILES_URL empty is the intended way to have Dify generate external URLs for file downloads docs. There’s no frontend or plugin workaround—correct environment variable configuration is required.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@zzzhhhlll commented on GitHub (Sep 28, 2025):
I checked the ports and only found 5001/tcp, but didn't see anything like 0.0.0.0:5001->5001/tcp. Does this mean the port isn't mapped?
@dosubot[bot] commented on GitHub (Sep 28, 2025):
Yes, if you only see 5001/tcp and not 0.0.0.0:5001->5001/tcp in your Docker port mapping, it means port 5001 is exposed inside the container but is not mapped to your host—so it’s not accessible from your browser or other devices on your network. This is why file downloads fail even after fixing your environment variables.
To fix this, edit your docker-compose.yml and under the api service, add:
Then restart your containers with:
After restarting, run
docker psand confirm you see 0.0.0.0:5001->5001/tcp for the api container. Now, with INTERNAL_FILES_URL unset and FILES_URL set to your host’s LAN IP (not localhost), file download links should work from your browser. This setup is required for external access to the file server and for Dify’s generated URLs to be reachable source source source.To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@zzzhhhlll commented on GitHub (Sep 28, 2025):
OK, it's working now. Thank you very much.
@dosubot[bot] commented on GitHub (Oct 10, 2025):
Hi, @zzzhhhlll. I'm Dosu, and I'm helping the dify-docs team manage their backlog and am marking this issue as stale.
Issue Summary:
Next Steps:
Thank you for your understanding and contribution!