Add support for downloading PowerPoint PPT files
Browse files228 unmodified lines229230231232233234228 unmodified linesapplied_revision = apply_docx_revisions(zipfile.ZipFile(bytes))extracted_data = await extract_bytes(applied_revision.read(), FORMAT_MIME_TYPES[".docx"], config=KREUZBERG_CONFIG)final_text = extracted_data.contentelse:if ext in FORMAT_MIME_TYPES: # file extension is supportedextracted_data = await extract_bytes(bytes.read(), FORMAT_MIME_TYPES[ext], config=KREUZBERG_CONFIG)228 unmodified lines229230231232233234235236237238239228 unmodified linesapplied_revision = apply_docx_revisions(zipfile.ZipFile(bytes))extracted_data = await extract_bytes(applied_revision.read(), FORMAT_MIME_TYPES[".docx"], config=KREUZBERG_CONFIG)final_text = extracted_data.contentelif ext == ".ppt":logging.debug(f"Converting {filename} .ppt --> .pptx")docx_bytes = await convert_file(bytes, doc_id, "ppt", "pptx")extracted_data = await extract_bytes(docx_bytes.read(), FORMAT_MIME_TYPES[".pptx"], config=KREUZBERG_CONFIG)final_text = extracted_data.contentelse:if ext in FORMAT_MIME_TYPES: # file extension is supportedextracted_data = await extract_bytes(bytes.read(), FORMAT_MIME_TYPES[ext], config=KREUZBERG_CONFIG)
api/docs.py+5