feat(suffix): 支持根目录重命名、列宽保存、锚定值与文件发布
Some checks failed
Check / delivery-static (push) Has been cancelled
Check / api (push) Has been cancelled
Check / web (push) Has been cancelled

This commit is contained in:
lianjianwei2024
2026-10-31 09:17:28 +08:00
parent ac4b4a1c06
commit 5fdac9902d
18 changed files with 824 additions and 314 deletions

View File

@@ -175,8 +175,10 @@ func (o *Operations) Middleware() gin.HandlerFunc {
return
}
}
// Uploads have their own 64 MiB streaming bound; other JSON routes get a 64 KiB ceiling.
if !(path == "/api/v1/products/:id/releases" && c.Request.Method == "POST") {
// Uploads have their own streaming bounds (releases 64 MiB; suffix templates
// bound in their handler); other JSON routes get a 64 KiB ceiling.
if !(path == "/api/v1/products/:id/releases" && c.Request.Method == "POST") &&
!(path == "/api/v1/suffix-admin/suffixes/:id/files" && c.Request.Method == "POST") {
if c.Request.ContentLength > 64<<10 {
apiError(c, 413, "body_too_large", "Request body too large")
c.Abort()