Skip to content

Commit

Permalink
fix: i hate go so much
Browse files Browse the repository at this point in the history
  • Loading branch information
harshkhandeparkar committed Jun 29, 2024
1 parent b35c8d2 commit 3eb37f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func upload(w http.ResponseWriter, r *http.Request) {
http.Error(w, "method not allowed", http.StatusMethodNotAllowed)
return
}
var response []uploadEndpointRes
var response []uploadEndpointRes = make([]uploadEndpointRes, 0)
// Max total size of 50MB
const MaxBodySize = 50 << 20 // 1<<20 = 1024*1024 = 1MB
r.Body = http.MaxBytesReader(w, r.Body, MaxBodySize)
Expand Down

0 comments on commit 3eb37f3

Please sign in to comment.