Unable to Read Uploaded Files in Local Docker Deployment — file.url is Empty #12858

Closed
opened 2026-02-21 19:09:24 -05:00 by yindo · 2 comments
Owner

Originally created by @aruig666 on GitHub (Apr 13, 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.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I deployed Dify locally on a Windows platform using Docker and tried uploading and analyzing files. However, I encountered an issue: after uploading a file, I am unable to read its content.

Image

When using the official online version of Dify, I was previously able to access the uploaded file through the file.url field.

Image

But in my local Docker deployment, after uploading a file, the file.url is empty, which causes the subsequent steps to fail.

Image

From my understanding, the local file URL might be different from the online version. What is the correct way to access uploaded files in a local deployment? Is there any recommended solution for this scenario?

Additionally, if I later deploy Dify to a remote server (such as a cloud server), will this behavior be the same as the online version, meaning I can directly use file.url?

I would really appreciate any guidance or suggestions. Thank you very much!

✔️ Expected Behavior

The URL of the file is passed to the next component

Image

Actual Behavior

The name of the file succeeded, but the URL was empty,

Image

Originally created by @aruig666 on GitHub (Apr 13, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I deployed Dify locally on a Windows platform using Docker and tried uploading and analyzing files. However, I encountered an issue: after uploading a file, I am unable to read its content. ![Image](https://github.com/user-attachments/assets/6f8ca644-c3d6-44e2-8258-a495a7deb16d) When using the official online version of Dify, I was previously able to access the uploaded file through the file.url field. ![Image](https://github.com/user-attachments/assets/5b17ea41-7465-4a9c-bc78-a074d4d6668e) But in my local Docker deployment, after uploading a file, the file.url is empty, which causes the subsequent steps to fail. ![Image](https://github.com/user-attachments/assets/02e81043-4c09-4d83-80a8-1559170ca844) From my understanding, the local file URL might be different from the online version. What is the correct way to access uploaded files in a local deployment? Is there any recommended solution for this scenario? Additionally, if I later deploy Dify to a remote server (such as a cloud server), will this behavior be the same as the online version, meaning I can directly use file.url? I would really appreciate any guidance or suggestions. Thank you very much! ### ✔️ Expected Behavior The URL of the file is passed to the next component ![Image](https://github.com/user-attachments/assets/f3f9332d-34b7-491f-8c12-16108e7c61cb) ### ❌ Actual Behavior The name of the file succeeded, but the URL was empty, ![Image](https://github.com/user-attachments/assets/02e81043-4c09-4d83-80a8-1559170ca844)
yindo added the 🐞 bug label 2026-02-21 19:09:24 -05:00
yindo closed this issue 2026-02-21 19:09:24 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 13, 2025):

To address the issue of accessing uploaded files in a local Docker deployment of Dify when the file.url is empty, you should use file.remote_url instead. The remote_url property provides the actual URL of the uploaded file. Additionally, ensure that you configure the FILES_URL in the docker/.env file. Set FILES_URL to your Dify access address, such as http://192.168.10.14/ (include the port number if not using port 80). This configuration is necessary for Dify to prefix file URLs with your access address for proper file handling and validation [1].

If you later deploy Dify to a remote server, you will need to update the FILES_URL to reflect the server's address. The behavior of needing a valid FILES_URL for file handling will remain the same, but the URL will need to match the remote server's address. Continue using file.remote_url to access the file URLs [2].

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[bot] commented on GitHub (Apr 13, 2025): <!-- Answer --> To address the issue of accessing uploaded files in a local Docker deployment of Dify when the `file.url` is empty, you should use `file.remote_url` instead. The `remote_url` property provides the actual URL of the uploaded file. Additionally, ensure that you configure the `FILES_URL` in the `docker/.env` file. Set `FILES_URL` to your Dify access address, such as `http://192.168.10.14/` (include the port number if not using port 80). This configuration is necessary for Dify to prefix file URLs with your access address for proper file handling and validation <sup>[[1]](https://github.com/langgenius/dify/issues/16309)</sup>. If you later deploy Dify to a remote server, you will need to update the `FILES_URL` to reflect the server's address. The behavior of needing a valid `FILES_URL` for file handling will remain the same, but the URL will need to match the remote server's address. Continue using `file.remote_url` to access the file URLs <sup>[[2]](https://github.com/langgenius/dify/issues/11769)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/353ea007-0e1d-4876-9cf7-fab7de144547?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/353ea007-0e1d-4876-9cf7-fab7de144547?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/353ea007-0e1d-4876-9cf7-fab7de144547?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/353ea007-0e1d-4876-9cf7-fab7de144547?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/353ea007-0e1d-4876-9cf7-fab7de144547?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/353ea007-0e1d-4876-9cf7-fab7de144547?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/353ea007-0e1d-4876-9cf7-fab7de144547?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Apr 13, 2025):

This is fixed in this PR fix: return null url when upload local file (#17752)

@crazywoola commented on GitHub (Apr 13, 2025): This is fixed in this PR fix: return null url when upload local file (#17752)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12858