fix: enforce upload limit
- also increase file size limit
This commit is contained in:
parent
26cf8aa1cb
commit
2baf3c6109
1 changed files with 2 additions and 1 deletions
|
@ -20,7 +20,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
maxUploadSize = 10 * 1024 * 1024 // 10 MB
|
||||
maxUploadSize = 3 * 1024 * 1024 * 1024 // 3 GB
|
||||
keySize = 32
|
||||
nonceSize = 12
|
||||
)
|
||||
|
@ -31,6 +31,7 @@ var db *sql.DB
|
|||
var dist embed.FS
|
||||
|
||||
func registerHandlers(e *echo.Echo) {
|
||||
e.Use(middleware.BodyLimit(fmt.Sprintf("%dM", maxUploadSize/(1024*1024))))
|
||||
e.Use(middleware.StaticWithConfig(middleware.StaticConfig{
|
||||
Root: "dist",
|
||||
Index: "upload.html",
|
||||
|
|
Loading…
Reference in a new issue