Skip to content

Commit 648ad7b

Browse files
authored
enhancement: adds missing mimetypes supported in unstructured (#384)
### Summary Adds missing MIME types that are currently supported in the `unstructured` library.
1 parent 79a7787 commit 648ad7b

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

CHANGELOG.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
## 0.0.65-dev1
1+
## 0.0.65-dev2
22

33
* Bump unstructured to 0.12.4
44
* Add support for both `list[str]` and `str` input formats for `ocr_languages` parameter
5+
* Adds support for additional MIME types from `unstructured`
56

67
## 0.0.64
78

@@ -88,7 +89,7 @@
8889

8990
## 0.0.48
9091

91-
* **Adds `languages` kwarg** `ocr_languages` will eventually be deprecated and replaced by `lanugages` to specify what languages to use for OCR
92+
* **Adds `languages` kwarg** `ocr_languages` will eventually be deprecated and replaced by `lanugages` to specify what languages to use for OCR
9293
* Adds a startup log and other minor cleanups
9394

9495
## 0.0.47
@@ -168,7 +169,7 @@
168169
* Bump unstructured library to 0.9.0
169170
* Add table support for image with parameter `skip_infer_table_types`
170171
* Add support for gzipped files
171-
172+
172173
## 0.0.33
173174

174175
* Image tweak, move application entrypoint to scripts/app-start.sh
@@ -217,7 +218,7 @@
217218

218219
## 0.0.25
219220

220-
* Bump image to use python 3.8.17 instead of 3.8.15
221+
* Bump image to use python 3.8.17 instead of 3.8.15
221222

222223
## 0.0.24
223224

@@ -255,12 +256,12 @@
255256
## 0.0.16
256257

257258
* Fix image build steps to support detectron2 install from Mac M1/M2
258-
* Upgrade to openssl 1.1.1 to accomodate the latest urllib3
259+
* Upgrade to openssl 1.1.1 to accomodate the latest urllib3
259260
* Bump unstructured for SpooledTemporaryFile fix
260261

261262
## 0.0.15
262263

263-
* Add msg and json types to supported
264+
* Add msg and json types to supported
264265

265266
## 0.0.14
266267

@@ -307,7 +308,7 @@
307308
* Updated Dockerfile for public release
308309
* Remove rate limiting in the API
309310
* Add file type validation via UNSTRUCTURED_ALLOWED_MIMETYPES
310-
* Major semver route also supported: /general/v0/general
311+
* Major semver route also supported: /general/v0/general
311312

312313
## 0.0.4
313314

prepline_general/api/general.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ def is_compatible_response_type(media_type: str, response_type: type) -> bool:
8181
"application/x-yaml,"
8282
"text/x-yaml,"
8383
"text/yaml,"
84+
"image/bmp,"
85+
"image/heic,"
86+
"image/tiff,"
87+
"text/org,"
8488
)
8589

8690
if not os.environ.get("UNSTRUCTURED_ALLOWED_MIMETYPES", None):

0 commit comments

Comments
 (0)