feat(panel): 我的提交页上传前按服务端单次上限预检,超限提示显示文件大小与上限

This commit is contained in:
Lemon-miaow committed 2026-09-25 18:37:02 +08:00
1 parent 87dee3e5a5
commit 516c58b543
7 files changed
+82 -5

No files matched your search

+5
View File
@@ -1735,6 +1735,11 @@ async function handleSubmissionRoute(ctx: SessionContext): Promise<boolean> {
return true;
}
// GET /api/v1/me/submissions/limits — the Cloudflare-edge default.
if (isMeSubmissions && is("GET", ctx) && ctx.parts.length === 5 && ctx.parts[4] === "limits") {
sendJSON(ctx.res, 200, { max_context_bytes: 95 * 1024 * 1024 });
return true;
}
// POST /api/v1/me/submissions
if (isMeSubmissions && is("POST", ctx) && ctx.parts.length === 4) {
const body = await readJSON<{ display_name?: string }>(ctx.req);