Log and save KDocs QR screenshot
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user