Skip to content

Commit

Permalink
feat: add VTT file support to Document Extractor (#11148)
Browse files Browse the repository at this point in the history
  • Loading branch information
fujita-h authored Nov 27, 2024
1 parent 9789905 commit a918cea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/core/workflow/nodes/document_extractor/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def _extract_text_by_mime_type(*, file_content: bytes, mime_type: str) -> str:
def _extract_text_by_file_extension(*, file_content: bytes, file_extension: str) -> str:
"""Extract text from a file based on its file extension."""
match file_extension:
case ".txt" | ".markdown" | ".md" | ".html" | ".htm" | ".xml":
case ".txt" | ".markdown" | ".md" | ".html" | ".htm" | ".xml" | ".vtt":
return _extract_text_from_plain_text(file_content)
case ".json":
return _extract_text_from_json(file_content)
Expand Down

0 comments on commit a918cea

Please sign in to comment.