优化结构

This commit is contained in:
Yvan
2026-08-22 12:13:16 +08:00
parent d987244d0e
commit b27a66e9d3
200 changed files with 1794 additions and 1715 deletions
+2 -2
View File
@@ -6,6 +6,7 @@ import (
"encoding/hex"
"errors"
"io"
"kra/internal/biz/system"
"log/slog"
"mime"
"net/http"
@@ -14,7 +15,6 @@ import (
"strings"
"time"
"kra/internal/biz"
"kra/internal/conf"
"github.com/gin-gonic/gin"
@@ -33,7 +33,7 @@ func AccessLog(runtime *conf.Runtime, logger *slog.Logger, version string) gin.H
config := runtime.Admin()
bodyLimit := defaultRequestBodyLimit
if mediaUpload {
bodyLimit = biz.DefaultMaxMediaFileSize + (1 << 20)
bodyLimit = system.DefaultMaxMediaFileSize + (1 << 20)
if config != nil && config.Media != nil && config.Media.MaxFileSize > 0 {
bodyLimit = config.Media.MaxFileSize + (1 << 20)
}