mirror of
https://github.com/tcsenpai/pensieve.git
synced 2025-06-07 03:35:24 +00:00
feat(ocr): use file type group
This commit is contained in:
parent
9ac7c4b5a5
commit
a218b9362b
@ -33,7 +33,7 @@ async def read_root():
|
|||||||
|
|
||||||
@app.post("/")
|
@app.post("/")
|
||||||
async def ocr(entity: Entity, request: Request):
|
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: "{}"}
|
return {METADATA_FIELD_NAME: "{}"}
|
||||||
|
|
||||||
# Get the URL to patch the entity's metadata from the "Location" header
|
# Get the URL to patch the entity's metadata from the "Location" header
|
||||||
|
Loading…
x
Reference in New Issue
Block a user