(self, content: bytes)
| 17 | """ |
| 18 | |
| 19 | def parse_into_text(self, content: bytes) -> Document: |
| 20 | logger.info("Parsing image file=%s, size=%d bytes", self.file_name, len(content)) |
| 21 | |
| 22 | ext = os.path.splitext(self.file_name)[1].lower() or ".png" |
| 23 | ref_path = f"images/{self.file_name}" |
| 24 | |
| 25 | text = f"" |
| 26 | images = {ref_path: base64.b64encode(content).decode()} |
| 27 | |
| 28 | return Document(content=text, images=images) |