Add support for downloading PowerPoint PPT files
Browse files228 unmodified lines229230231232233234235236237238239228 unmodified lines applied_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.content elif 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.content else: if ext in FORMAT_MIME_TYPES: # file extension is supported extracted_data = await extract_bytes(bytes.read(), FORMAT_MIME_TYPES[ext], config=KREUZBERG_CONFIG)api/docs.py+5