Skip to content

Commit 26d403d

Browse files
authored
fix: add missing params to ElementMetadata (#3092)
A couple of parameters needed for DOCX image extraction were not added as parameters to the `ElementMetadata` constructor when they were added as known fields. Also repair a couple gaps in alphabetical ordering cause by recent additions.
1 parent 35ec21e commit 26d403d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

unstructured/documents/elements.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,15 @@ def __init__(
234234
filename: Optional[str | pathlib.Path] = None,
235235
filetype: Optional[str] = None,
236236
header_footer_type: Optional[str] = None,
237+
image_base64: Optional[str] = None,
238+
image_mime_type: Optional[str] = None,
237239
image_path: Optional[str] = None,
238240
is_continuation: Optional[bool] = None,
239241
languages: Optional[list[str]] = None,
240242
last_modified: Optional[str] = None,
243+
link_start_indexes: Optional[list[int]] = None,
241244
link_texts: Optional[list[str]] = None,
242245
link_urls: Optional[list[str]] = None,
243-
link_start_indexes: Optional[list[int]] = None,
244246
links: Optional[list[Link]] = None,
245247
orig_elements: Optional[list[Element]] = None,
246248
page_name: Optional[str] = None,
@@ -251,8 +253,8 @@ def __init__(
251253
sent_to: Optional[list[str]] = None,
252254
signature: Optional[str] = None,
253255
subject: Optional[str] = None,
254-
text_as_html: Optional[str] = None,
255256
table_as_cells: Optional[dict[str, str | int]] = None,
257+
text_as_html: Optional[str] = None,
256258
url: Optional[str] = None,
257259
) -> None:
258260
self.attached_to_filename = attached_to_filename
@@ -274,6 +276,8 @@ def __init__(
274276

275277
self.filetype = filetype
276278
self.header_footer_type = header_footer_type
279+
self.image_base64 = image_base64
280+
self.image_mime_type = image_mime_type
277281
self.image_path = image_path
278282
self.is_continuation = is_continuation
279283
self.languages = languages

0 commit comments

Comments
 (0)