upload: buffer MIME parsing on disk, not in memory
This commit is contained in:
parent
8d11b7c434
commit
6720cbc0d9
@ -20,7 +20,7 @@ func (this *Server) handleUpload(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
remoteIP := this.remoteIP(r)
|
||||
|
||||
err := r.ParseMultipartForm(this.opts.MaxUploadBytes * 2)
|
||||
err := r.ParseMultipartForm(0) // buffer upload in temporary files on disk, not memory
|
||||
if err != nil {
|
||||
log.Printf("%s Invalid request: %s\n", remoteIP, err.Error())
|
||||
http.Error(w, "Invalid request", 400)
|
||||
|
Loading…
Reference in New Issue
Block a user