Skip to content

Commit c0f14e3

Browse files
committed
feat(document): register the Box Note mime type
DocumentOrigin rejects application/vnd.box.boxnote because it isn't in Python's mimetypes registry, so the Box Note backend in docling (docling-project/docling#3722) falls back to application/json. This registers it in _extra_mimetypes so the backend can use the correct mime. The list is also sorted alphabetically now. Signed-off-by: pablopupo <145598901+pablopupo@users.noreply.github.com>
1 parent cf8648b commit c0f14e3

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

‎docling_core/types/doc/document.py‎

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,22 +1074,23 @@ class DocumentOrigin(BaseModel):
10741074
)
10751075

10761076
_extra_mimetypes: typing.ClassVar[list[str]] = [
1077-
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
1078-
"application/vnd.openxmlformats-officedocument.wordprocessingml.template",
1079-
"application/vnd.openxmlformats-officedocument.presentationml.template",
1080-
"application/vnd.openxmlformats-officedocument.presentationml.slideshow",
1077+
"application/vnd.box.boxnote",
1078+
"application/vnd.oasis.opendocument.presentation",
1079+
"application/vnd.oasis.opendocument.spreadsheet",
1080+
"application/vnd.oasis.opendocument.text",
10811081
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
1082+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow",
1083+
"application/vnd.openxmlformats-officedocument.presentationml.template",
10821084
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
1083-
"application/vnd.oasis.opendocument.text",
1084-
"application/vnd.oasis.opendocument.spreadsheet",
1085-
"application/vnd.oasis.opendocument.presentation",
1085+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
1086+
"application/vnd.openxmlformats-officedocument.wordprocessingml.template",
1087+
"audio/mp3",
1088+
"audio/wav",
1089+
"audio/x-wav",
10861090
"text/asciidoc",
1087-
"text/markdown",
10881091
"text/csv",
1092+
"text/markdown",
10891093
"text/vtt",
1090-
"audio/x-wav",
1091-
"audio/wav",
1092-
"audio/mp3",
10931094
]
10941095

10951096
@field_validator("binary_hash", mode="before")

0 commit comments

Comments
 (0)