Skip to content

Commit 8523325

Browse files
committed
Added proper rtf file handling.
1 parent f607e64 commit 8523325

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ocr_service/processor/processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def _process(self, stream: bytes, file_name: str) -> str:
307307

308308
if type(file_type) is archive.Pdf:
309309
pdf_stream = stream
310-
elif file_type in DOCUMENT:
310+
elif file_type in DOCUMENT or type(file_type) is archive.Rtf:
311311
pdf_stream = self._preprocess_doc(stream, file_name=file_name)
312312
elif file_type in IMAGE:
313313
images = [Image.open(BytesIO(stream))]

0 commit comments

Comments
 (0)