mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-27 12:34:22 +00:00
apply styling
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
parent
48d5405db1
commit
492680f468
@ -283,9 +283,14 @@ class _DocumentConversionInput(BaseModel):
|
||||
if mime is None: # must guess from
|
||||
with obj.open("rb") as f:
|
||||
content = f.read(1024) # Read first 1KB
|
||||
if mime is not None and mime.lower() == "application/zip" and obj.suffixes[-1].lower() == ".xlsx":
|
||||
mime = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
|
||||
if (
|
||||
mime is not None
|
||||
and mime.lower() == "application/zip"
|
||||
and obj.suffixes[-1].lower() == ".xlsx"
|
||||
):
|
||||
mime = (
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
)
|
||||
|
||||
elif isinstance(obj, DocumentStream):
|
||||
content = obj.stream.read(8192)
|
||||
|
Loading…
Reference in New Issue
Block a user