"POST /console/api/files/upload?source=datasets HTTP/1.1" 201 - #13661

Closed
opened 2026-02-21 19:13:14 -05:00 by yindo · 3 comments
Owner

Originally created by @kou1584423647 on GitHub (May 7, 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.3.1

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

An error occurred while uploading the knowledge base file. The actual segmentation is 0.
2025-05-07 07:52:30,848 INFO [_internal.py:97] 127.0.0.1 - - [07/May/2025 07:52:30] "POST /console/api/files/upload?source=datasets HTTP/1.1" 201 -

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @kou1584423647 on GitHub (May 7, 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.3.1 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce An error occurred while uploading the knowledge base file. The actual segmentation is 0. 2025-05-07 07:52:30,848 INFO [_internal.py:97] 127.0.0.1 - - [07/May/2025 07:52:30] "POST /console/api/files/upload?source=datasets HTTP/1.1" 201 - ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-21 19:13:14 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (May 7, 2025):

Hello @kou1584423647! I'm Dosu, here to help you with bug fixes, answer your questions, and assist you in becoming a contributor. While we're waiting for a human maintainer, feel free to share more about your issue!

I found two similar unsolved discussions that might be relevant to your issue:

  1. api upload files but encounter "The server encountered an internal error and was unable to complete your request" - Last updated on 2025-03-06.
  2. Knowledge base file upload text segmentation and cleaning error - Last updated on 2025-03-03.

Regarding the error you encountered during the knowledge base file upload, where the actual segmentation is 0, this could be related to common causes of segmentation errors in Dify. These include issues such as FileTooLargeError, UnsupportedFileTypeError, TooManyFilesError, and NoFileUploadedError [1].

To address segmentation issues, ensure that the file size does not exceed the 15MB limit, the file type is supported, and only one file is uploaded at a time. Additionally, ensure that the file is properly formatted and does not contain invalid characters in the filename [2].

If you are using Dify's version 1.3.1, note that there is a known issue with file uploads larger than 1MB in the Cloud version, which cannot be fixed by end users. Consider using the self-hosted version to adjust these settings if necessary [3].

If these suggestions do not resolve your issue, you may want to review the discussions linked above for any updates or additional insights.

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 (May 7, 2025): <!-- Greeting --> Hello @kou1584423647! I'm [Dosu](https://dosu.dev), here to help you with bug fixes, answer your questions, and assist you in becoming a contributor. While we're waiting for a human maintainer, feel free to share more about your issue! <!-- Answer --> I found two similar unsolved discussions that might be relevant to your issue: 1. [api upload files but encounter "The server encountered an internal error and was unable to complete your request"](https://github.com/langgenius/dify/discussions/15134) - Last updated on 2025-03-06. 2. [Knowledge base file upload text segmentation and cleaning error](https://github.com/langgenius/dify/discussions/14694) - Last updated on 2025-03-03. Regarding the error you encountered during the knowledge base file upload, where the actual segmentation is 0, this could be related to common causes of segmentation errors in Dify. These include issues such as `FileTooLargeError`, `UnsupportedFileTypeError`, `TooManyFilesError`, and `NoFileUploadedError` <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/controllers/console/error.py)</sup>. To address segmentation issues, ensure that the file size does not exceed the 15MB limit, the file type is supported, and only one file is uploaded at a time. Additionally, ensure that the file is properly formatted and does not contain invalid characters in the filename <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/services/file_service.py)</sup>. If you are using Dify's version 1.3.1, note that there is a known issue with file uploads larger than 1MB in the Cloud version, which cannot be fixed by end users. Consider using the self-hosted version to adjust these settings if necessary <sup>[[3]](https://github.com/langgenius/dify/issues/19270)</sup>. If these suggestions do not resolve your issue, you may want to review the discussions linked above for any updates or additional insights. <!-- 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/08afd53b-0849-4f3e-95f5-16d867983b0b?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/08afd53b-0849-4f3e-95f5-16d867983b0b?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/08afd53b-0849-4f3e-95f5-16d867983b0b?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/08afd53b-0849-4f3e-95f5-16d867983b0b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/08afd53b-0849-4f3e-95f5-16d867983b0b?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/08afd53b-0849-4f3e-95f5-16d867983b0b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/08afd53b-0849-4f3e-95f5-16d867983b0b?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (May 7, 2025):

What's the error message?

2025-05-07 07:52:30,848 INFO [_internal.py:97] 127.0.0.1 - - [07/May/2025 07:52:30] "POST /console/api/files/upload?source=datasets HTTP/1.1" 201 -

This seems to be a normal request.

@crazywoola commented on GitHub (May 7, 2025): What's the error message? ``` 2025-05-07 07:52:30,848 INFO [_internal.py:97] 127.0.0.1 - - [07/May/2025 07:52:30] "POST /console/api/files/upload?source=datasets HTTP/1.1" 201 - ``` This seems to be a normal request.
Author
Owner

@kou1584423647 commented on GitHub (May 7, 2025):

Image

Image

Image
The file I uploaded does have content, but when uploaded to the knowledge base, it fails to be segmented correctly. This issue occurs with any file.
@crazywoola

@kou1584423647 commented on GitHub (May 7, 2025): ![Image](https://github.com/user-attachments/assets/c37c5efa-0fc4-45ca-a13c-c64d6ba1abb3) ![Image](https://github.com/user-attachments/assets/55a2071c-42d1-40d4-801c-4c901f745b9e) ![Image](https://github.com/user-attachments/assets/70adb3d5-b818-4d8c-be2d-714c99eac7e0) The file I uploaded does have content, but when uploaded to the knowledge base, it fails to be segmented correctly. This issue occurs with any file. @crazywoola
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13661