feat(ocr): use file type group

This commit is contained in:
arkohut 2024-07-03 00:16:24 +08:00
parent 9ac7c4b5a5
commit a218b9362b

View File

@ -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