fix parser for pptx of which files are from filemanager (#2482)

### What problem does this PR solve?

#2467

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2024-09-18 19:13:37 +08:00
committed by GitHub
parent 2b0dc01a88
commit 2324b88579
2 changed files with 10 additions and 11 deletions

View File

@ -77,7 +77,7 @@ def convert():
doc = DocumentService.insert({
"id": get_uuid(),
"kb_id": kb.id,
"parser_id": kb.parser_id,
"parser_id": FileService.get_parser(file.type, file.name, kb.parser_id),
"parser_config": kb.parser_config,
"created_by": current_user.id,
"type": file.type,
@ -85,7 +85,6 @@ def convert():
"location": file.location,
"size": file.size
})
FileService.set_constant_parser(doc, file.name)
file2document = File2DocumentService.insert({
"id": get_uuid(),
"file_id": id,