Create documents by files upload file by api return 404 error #13446

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

Originally created by @zhongty on GitHub (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.2.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When using the Get Upload File API function,some file could upload success,some file returns 404 error

Image

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @zhongty on GitHub (Apr 27, 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.2.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When using the Get Upload File API function,some file could upload success,some file returns 404 error ![Image](https://github.com/user-attachments/assets/66f01eca-5f65-448d-ad81-3fa341880140) ![Image](https://github.com/user-attachments/assets/a5d99832-c942-4ee1-9cc2-ff6533622901) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-21 19:12:12 -05:00
Author
Owner

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

Hello @zhongty! I'm Dosu, a bot here to help you solve bugs, answer questions, and assist you in becoming a contributor. I'm here while you wait for a human maintainer. Let's tackle this issue together!

I found a similar unsolved discussion regarding a "File not found" issue while uploading a file to knowledge in the Dify repository [1].

For your specific issue, here are some potential areas to investigate:

  1. File Types and Sizes: Ensure that the files you are trying to upload are of supported types and within the size limits. The supported file types include txt, markdown, md, pdf, html, xlsx, docx, and csv [2].

  2. Configuration for Self-Hosted Instances: Verify that your FILES_URL is correctly configured in the docker/.env file. This should include the full URL with the IP address and port number if not using the default port 80 [3].

  3. File Paths and URLs: Check if there is a mismatch in file paths or URLs. Ensure that you are using file.remote_url instead of file.url to retrieve the correct image URL, and that the URL is accessed within the valid timeframe [4].

  4. Error Handling: Review any logs or error messages for additional context on why the 404 error is occurring. This might provide more insight into the specific conditions leading to the error.

These steps should help you troubleshoot the 404 error during file uploads. If the issue persists, consider reviewing the configuration and logs for any additional clues.

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 27, 2025): <!-- Greeting --> Hello @zhongty! I'm [Dosu](https://dosu.dev), a bot here to help you solve bugs, answer questions, and assist you in becoming a contributor. I'm here while you wait for a human maintainer. Let's tackle this issue together! <!-- Answer --> I found a similar unsolved discussion regarding a "File not found" issue while uploading a file to knowledge in the Dify repository <sup>[[1]](https://github.com/langgenius/dify/discussions/17742)</sup>. For your specific issue, here are some potential areas to investigate: 1. **File Types and Sizes**: Ensure that the files you are trying to upload are of supported types and within the size limits. The supported file types include `txt`, `markdown`, `md`, `pdf`, `html`, `xlsx`, `docx`, and `csv` <sup>[[2]](https://github.com/langgenius/dify/blob/main/web/app/components/base/file-uploader/constants.ts)</sup>. 2. **Configuration for Self-Hosted Instances**: Verify that your `FILES_URL` is correctly configured in the `docker/.env` file. This should include the full URL with the IP address and port number if not using the default port 80 <sup>[[3]](https://github.com/langgenius/dify/issues/15847)</sup>. 3. **File Paths and URLs**: Check if there is a mismatch in file paths or URLs. Ensure that you are using `file.remote_url` instead of `file.url` to retrieve the correct image URL, and that the URL is accessed within the valid timeframe <sup>[[4]](https://github.com/langgenius/dify/issues/11580)</sup>. 4. **Error Handling**: Review any logs or error messages for additional context on why the 404 error is occurring. This might provide more insight into the specific conditions leading to the error. These steps should help you troubleshoot the 404 error during file uploads. If the issue persists, consider reviewing the configuration and logs for any additional clues. <!-- 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/6dcde8c4-a3e0-4958-b440-e363641a3e51?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/6dcde8c4-a3e0-4958-b440-e363641a3e51?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/6dcde8c4-a3e0-4958-b440-e363641a3e51?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/6dcde8c4-a3e0-4958-b440-e363641a3e51?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/6dcde8c4-a3e0-4958-b440-e363641a3e51?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/6dcde8c4-a3e0-4958-b440-e363641a3e51?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/6dcde8c4-a3e0-4958-b440-e363641a3e51?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#13446