mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-04-22 14:10:01 +08:00
Bug fix - email processing could be run now from API (#2613)
### What problem does this PR solve? If .eml file is uploaded, there is always General method chosen for email processing, even if parsing_method is defined in the request. This change solves this issue. ### Type of change - [X] Bug Fix (non-breaking change which fixes an issue) Co-authored-by: Adam Kobus <adam.kobus@gitlab.eleader.biz>
This commit is contained in:
parent
35598c04ce
commit
b16f16e19e
@ -454,6 +454,8 @@ def upload():
|
|||||||
doc["parser_id"] = ParserType.AUDIO.value
|
doc["parser_id"] = ParserType.AUDIO.value
|
||||||
if re.search(r"\.(ppt|pptx|pages)$", filename):
|
if re.search(r"\.(ppt|pptx|pages)$", filename):
|
||||||
doc["parser_id"] = ParserType.PRESENTATION.value
|
doc["parser_id"] = ParserType.PRESENTATION.value
|
||||||
|
if re.search(r"\.(eml)$", filename):
|
||||||
|
doc["parser_id"] = ParserType.EMAIL.value
|
||||||
|
|
||||||
doc_result = DocumentService.insert(doc)
|
doc_result = DocumentService.insert(doc)
|
||||||
FileService.add_file_from_kb(doc, kb_folder["id"], kb.tenant_id)
|
FileService.add_file_from_kb(doc, kb_folder["id"], kb.tenant_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user