From a218b9362b1f1d0c178e0585187cd3b0c5d723a1 Mon Sep 17 00:00:00 2001 From: arkohut <39525455+arkohut@users.noreply.github.com> Date: Wed, 3 Jul 2024 00:16:24 +0800 Subject: [PATCH] feat(ocr): use file type group --- plugins/ocr/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ocr/main.py b/plugins/ocr/main.py index 01d1926..a1dd52f 100644 --- a/plugins/ocr/main.py +++ b/plugins/ocr/main.py @@ -33,7 +33,7 @@ async def read_root(): @app.post("/") async def ocr(entity: Entity, request: Request): - if not entity.file_type.startswith("image/"): + if not entity.file_type_group == "image": return {METADATA_FIELD_NAME: "{}"} # Get the URL to patch the entity's metadata from the "Location" header