reduce in memory size of uploads

This commit is contained in:
Radon 2025-09-03 20:56:30 -05:00
parent 5fc42b6136
commit fd40e2285a

4
hub.go
View File

@ -154,8 +154,8 @@ func HandleFileUpload(h *server.Hub, filesDir string, fileTimeout time.Duration,
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
return
}
// Parse multipart form (50MB max memory)
err := r.ParseMultipartForm(100 << 20)
err := r.ParseMultipartForm(32 << 20)
if err != nil {
http.Error(w, "Error parsing form", http.StatusBadRequest)
return