fix: The image uploaded from the workflow knowledge base zip file cannot be parsed (#4507)

This commit is contained in:
shaohuzhang1 2025-12-12 14:35:03 +08:00 committed by GitHub
parent 621fbd3bd6
commit 61a5303e7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,7 +32,7 @@ class TextSplitHandle(BaseSplitHandle):
if file_name.endswith(".md") or file_name.endswith('.txt') or file_name.endswith('.TXT') or file_name.endswith(
'.MD'):
return True
if file_name.index('.') > 0:
if '.' in file_name:
return False
buffer = get_buffer(file)
result = detect(buffer)