Log and save KDocs QR screenshot

This commit is contained in:
2026-01-07 13:49:37 +08:00
parent 19f083df7b
commit 6af8f46129

View File

@@ -542,6 +542,15 @@ class KDocsUploader:
pass
return {"success": False, "error": self._last_error}
try:
ts = int(time.time())
path = f"data/kdocs_last_qr_{ts}.png"
with open(path, "wb") as handle:
handle.write(qr_image)
logger.info(f"[KDocs] 已保存二维码截图: {path} ({len(qr_image)} bytes)")
except Exception as e:
logger.warning(f"[KDocs] 保存二维码截图失败: {e}")
self._last_qr_image = qr_image
self._login_required = True
return {