Skip to content

Commit

Permalink
feat: log the number of files
Browse files Browse the repository at this point in the history
  • Loading branch information
harshkhandeparkar committed Jun 29, 2024
1 parent 7fe1f62 commit 2d6b77e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ func upload(w http.ResponseWriter, r *http.Request) {
}

files := r.MultipartForm.File["files"]
log.Printf("/upload: Received %d files.", len(files))
if len(files) > maxLimit {
http.Error(w, fmt.Sprintf("maximum %d files allowed", maxLimit), http.StatusBadRequest)
return
Expand Down

0 comments on commit 2d6b77e

Please sign in to comment.