For csv files mimetypes.guess_type is returning "application/vnd.ms-excel" on windows causing an invalid mime type in plaintextconverter. In reference to issue: https://github.com/microsoft/markitdown/issues/150 (#273)

This commit is contained in:
wunde005 2025-02-08 22:58:13 -06:00 committed by GitHub
parent 2a4f7bb6a8
commit 73ba69d8cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,6 +46,9 @@ from azure.identity import DefaultAzureCredential
# This constant is a temporary fix until the bug is resolved.
CONTENT_FORMAT = "markdown"
# Override mimetype for csv to fix issue on windows
mimetypes.add_type("text/csv", ".csv")
# Optional Transcription support
IS_AUDIO_TRANSCRIPTION_CAPABLE = False
try: