mirror of
https://github.com/DS4SD/docling.git
synced 2025-08-02 15:32:30 +00:00
disabled auto file mime type detection, rely on extension
This commit is contained in:
parent
9d9ed0716f
commit
47c21a5edc
@ -273,7 +273,8 @@ class _DocumentConversionInput(BaseModel):
|
||||
formats: list[InputFormat] = []
|
||||
|
||||
if isinstance(obj, Path):
|
||||
mime = filetype.guess_mime(str(obj))
|
||||
# mime = filetype.guess_mime(str(obj)) # We're having too much conflicts with documents being worngly classified as ZIP
|
||||
mime = None
|
||||
if mime is None:
|
||||
ext = obj.suffix[1:]
|
||||
mime = _DocumentConversionInput._mime_from_extension(ext)
|
||||
|
Loading…
Reference in New Issue
Block a user