mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix: check the file name length. (#6083)
### What problem does this PR solve? #6060 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -139,10 +139,9 @@ class TestUploadDocuments:
|
||||
# filename_length = 129
|
||||
fp = create_txt_file(tmp_path / f"{'a' * (DOCUMENT_NAME_LIMIT - 3)}.txt")
|
||||
res = upload_documnets(get_http_api_auth, ids[0], [fp])
|
||||
assert res["code"] == 500
|
||||
assert res["code"] == 101
|
||||
assert (
|
||||
res["message"]
|
||||
== f"{'a' * (DOCUMENT_NAME_LIMIT - 3)}.txt: Exceed the maximum length of file name!"
|
||||
res["message"].find("128") >= 0
|
||||
)
|
||||
|
||||
def test_invalid_dataset_id(self, get_http_api_auth, tmp_path):
|
||||
|
||||
Reference in New Issue
Block a user