feat(attach): 附件可配置限额、流式落盘与分阶段上传

管理端可配类型/体积;上传改流式避免整文件进内存;发帖先选再传并拦截未上传提交;提高 Next proxy 体积上限。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-17 07:33:16 +08:00
parent 6cc434f103
commit 61bf9fb48c
24 changed files with 2513 additions and 307 deletions

View File

@@ -11,6 +11,10 @@ const nextConfig: NextConfig = {
{ protocol: "http", hostname: "localhost" },
],
},
experimental: {
// rewrite/proxy 默认只缓冲 10MB;附件上限由 Go 站点设置决定,此处留足余量(含 multipart 开销)
proxyClientMaxBodySize: "512mb",
},
async rewrites() {
return [
{