upload local file,can not get file‘s URL #11979

Closed
opened 2026-02-21 19:05:05 -05:00 by yindo · 1 comment
Owner

Originally created by @Mr-Yu-95 on GitHub (Mar 22, 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.0.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Hi all,
when i upload local file,i can not get file‘s URL;

My goal:
When the uploaded file type is a .mp3 file, I need to obtain the file save path to parse the file

Is there any relevant solution?

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @Mr-Yu-95 on GitHub (Mar 22, 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.0.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Hi all, when i upload local file,i can not get file‘s URL; My goal: When the uploaded file type is a .mp3 file, I need to obtain the file save path to parse the file Is there any relevant solution? ![Image](https://github.com/user-attachments/assets/a836ed06-d223-4dcd-9d61-c5431363cc2a) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 19:05:05 -05:00
yindo closed this issue 2026-02-21 19:05:05 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 22, 2025):

There are similar threads discussing issues with obtaining a file URL after uploading a local file in a self-hosted Dify setup. Here are some relevant discussions and solutions:

  1. Similar Discussions:

  2. Open Issues:

These solutions involve checking your environment variables and Docker configurations, as well as using the appropriate methods to generate the file URL.

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 (Mar 22, 2025): <!-- Answer --> There are similar threads discussing issues with obtaining a file URL after uploading a local file in a self-hosted Dify setup. Here are some relevant discussions and solutions: 1. **Similar Discussions**: - [How could get the upload image file?](https://github.com/langgenius/dify/discussions/15112) <sup>[[1]](https://github.com/langgenius/dify/discussions/15112)</sup> - [how to get uploaded file url](https://github.com/langgenius/dify/discussions/14092) <sup>[[2]](https://github.com/langgenius/dify/discussions/14092)</sup> 2. **Open Issues**: - [How to get local file url, when upload the file by local uploading?](https://github.com/langgenius/dify/issues/12228) suggests using the `generate_url` method to obtain the local file URL. This method checks the `transfer_method` and uses the `related_id` to generate a signed file URL if the `transfer_method` is `LOCAL_FILE`. Ensure that the `related_id` is provided <sup>[[3]](https://github.com/langgenius/dify/issues/12228)</sup>. - [Cannot obtain a URL when uploading local file](https://github.com/langgenius/dify/issues/10566) recommends ensuring that environment variables are correctly loaded and that the `STORAGE_TYPE` is set to `local` with a properly defined and mounted `STORAGE_LOCAL_PATH` in your Docker setup <sup>[[4]](https://github.com/langgenius/dify/issues/10566)</sup>. These solutions involve checking your environment variables and Docker configurations, as well as using the appropriate methods to generate the file URL. <!-- 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/2fb6d0f9-2b93-4471-9b67-63162ce6c013?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/2fb6d0f9-2b93-4471-9b67-63162ce6c013?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/2fb6d0f9-2b93-4471-9b67-63162ce6c013?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/2fb6d0f9-2b93-4471-9b67-63162ce6c013?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/2fb6d0f9-2b93-4471-9b67-63162ce6c013?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/2fb6d0f9-2b93-4471-9b67-63162ce6c013?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/2fb6d0f9-2b93-4471-9b67-63162ce6c013?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#11979