Skip to content

Commit f8afbde

Browse files
committed
set max file size 100MB
1 parent bf31c1a commit f8afbde

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func main() {
7979
wsHandler = handler.NewWebSocketHandler(statsService)
8080

8181
app := fiber.New(fiber.Config{
82-
BodyLimit: 25 * 1024 * 2014,
82+
BodyLimit: 100 * 1024 * 1024, // 100MB to match nginx configuration
8383
// Enable graceful shutdown
8484
DisableStartupMessage: true,
8585
IdleTimeout: 5 * time.Second,

pkg/middleware/security.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func DefaultSecurityConfig() SecurityConfig {
6464
AllowCredentials: true,
6565
},
6666
TrustedProxies: []string{"127.0.0.1"},
67-
MaxRequestBodySize: 25 * 1024 * 1024, // 25MB
67+
MaxRequestBodySize: 100 * 1024 * 1024, // 100MB
6868
RequestTimeout: 30 * time.Second,
6969
}
7070
}

pkg/validator/file.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
)
1111

1212
var (
13-
// Default maximum file size (25MB)
14-
DefaultMaxFileSize int64 = 25 * 1024 * 1024
13+
// Default maximum file size (100MB)
14+
DefaultMaxFileSize int64 = 100 * 1024 * 1024
1515

1616
// Allowed file formats
1717
AllowedImageFormats = map[string]bool{

public/swagger.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ paths:
120120
summary: File upload
121121
description: |
122122
Single file upload endpoint.
123-
- Maximum file size: 25MB
123+
- Maximum file size: 100MB
124124
- Supported formats: JPG, PNG, GIF, WebP
125125
- Automatic format optimization
126126
tags:
@@ -423,7 +423,7 @@ paths:
423423
summary: Upload file from URL
424424
description: |
425425
Downloads and uploads a file from a given URL.
426-
- Maximum file size: 25MB
426+
- Maximum file size: 100MB
427427
- Supports various file formats
428428
- Can optionally upload to AWS S3
429429
tags:

0 commit comments

Comments
 (0)