We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a0dcaf commit 770c951Copy full SHA for 770c951
1 file changed
main.go
@@ -101,9 +101,22 @@ func main() {
101
defer uploadTracker.Close()
102
}
103
104
+ // Configure body limit based on chunk size or max video size
105
+ bodyLimit := 4 * 1024 * 1024 // Default 4MB
106
+ if config.UploadingEnabled {
107
+ if config.ChunkSize > 0 {
108
+ bodyLimit = int(config.ChunkSize) + (1 * 1024 * 1024) // ChunkSize + 1MB buffer
109
+ } else if config.MaxVideoSize > 0 {
110
+ bodyLimit = config.MaxVideoSize * 1024 * 1024
111
+ } else {
112
+ bodyLimit = 100 * 1024 * 1024 // Default 100MB if no limits set
113
+ }
114
115
+
116
app := fiber.New(fiber.Config{
117
DisableStartupMessage: true,
118
Prefork: config.Prefork,
119
+ BodyLimit: bodyLimit,
120
})
121
122
prometheusModule := fiberprometheus.New("media-proxy")
0 commit comments