From 5cd1a678c88f55d8a0bff98a0b3b65da6ea76450 Mon Sep 17 00:00:00 2001 From: Magicbook1108 Date: Thu, 18 Dec 2025 11:35:01 +0800 Subject: [PATCH] Fix: image edit in edit_chunk (#12009) ### What problem does this PR solve? Fix: image edit in edit_chunk #11971 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- api/apps/chunk_app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/apps/chunk_app.py b/api/apps/chunk_app.py index a5df41983..36c3936a2 100644 --- a/api/apps/chunk_app.py +++ b/api/apps/chunk_app.py @@ -176,10 +176,12 @@ async def set(): settings.docStoreConn.update({"id": req["chunk_id"]}, _d, search.index_name(tenant_id), doc.kb_id) # update image + image_id = req.get("img_id") + bkt, name = image_id.split("-") image_base64 = req.get("image_base64", None) if image_base64: image_binary = base64.b64decode(image_base64) - settings.STORAGE_IMPL.put(req["doc_id"], req["chunk_id"], image_binary) + settings.STORAGE_IMPL.put(bkt, name, image_binary) return get_json_result(data=True) return await asyncio.to_thread(_set_sync)