Fix options review screenshots missing after journal upload hijack.

Stop journal_upload_slots from binding options slots; resolve journal_* files from static/images root so existing reviews display again.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-19 16:23:37 +08:00
parent 12574ae88a
commit 72dddc5106
8 changed files with 82 additions and 14 deletions
+7 -1
View File
@@ -100,7 +100,13 @@ def register_options_review_routes(app: Flask, cfg: dict[str, Any], repo_root: s
safe = os.path.basename(filename or "")
path = os.path.join(folder, safe)
if not os.path.isfile(path):
return ("not found", 404)
# 兼容误走合约 journal 上传、落在 UPLOAD_FOLDER 根目录的文件
root = os.path.abspath(cfg["upload_folder"] or "")
alt = os.path.join(root, safe)
if os.path.isfile(alt):
path = alt
else:
return ("not found", 404)
return send_file(path)
@app.route("/api/options/review/sync", methods=["POST"])