mirror of
https://github.com/DS4SD/docling.git
synced 2025-08-02 07:22:14 +00:00
add more file types when infering the mime type from extesion
This commit is contained in:
parent
82441ed6d2
commit
9d9ed0716f
@ -350,6 +350,16 @@ class _DocumentConversionInput(BaseModel):
|
||||
mime = FormatToMimeType[InputFormat.HTML][0]
|
||||
elif ext in FormatToExtensions[InputFormat.MD]:
|
||||
mime = FormatToMimeType[InputFormat.MD][0]
|
||||
|
||||
elif ext in FormatToExtensions[InputFormat.PDF]:
|
||||
mime = FormatToMimeType[InputFormat.PDF][0]
|
||||
elif ext in FormatToExtensions[InputFormat.DOCX]:
|
||||
mime = FormatToMimeType[InputFormat.DOCX][0]
|
||||
elif ext in FormatToExtensions[InputFormat.PPTX]:
|
||||
mime = FormatToMimeType[InputFormat.PPTX][0]
|
||||
elif ext in FormatToExtensions[InputFormat.XLSX]:
|
||||
mime = FormatToMimeType[InputFormat.XLSX][0]
|
||||
|
||||
return mime
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
Reference in New Issue
Block a user