Update g4f/image/__init__.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
H Lohaus 2025-09-03 17:11:43 +02:00 committed by GitHub
parent c49e5b94b3
commit 6935580bd7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -237,7 +237,7 @@ def detect_file_type(binary_data: bytes) -> tuple[str, str] | None:
elif binary_data.startswith(b"%PDF"):
return ".pdf", "application/pdf"
elif binary_data.startswith(b"PK\x03\x04"):
return".zip", "application/zip-based",
return ".zip", "application/zip-based"
# could be docx/xlsx/pptx/jar/apk/odt
elif binary_data.startswith(b"\xd0\xcf\x11\xe0"):
return ".doc", "application/vnd.ms-office"