refactor all methods strings to const (#5726)

This commit is contained in:
Konstantin Lebedev
2024-07-01 13:00:39 +05:00
committed by GitHub
parent 0fdf7eca48
commit 5ffacbb6ea
18 changed files with 84 additions and 84 deletions

View File

@@ -43,7 +43,7 @@ func ParseUpload(r *http.Request, sizeLimit int64, bytesBuffer *bytes.Buffer) (p
}
}
if r.Method == "POST" {
if r.Method == http.MethodPost {
contentType := r.Header.Get("Content-Type")
// If content-type is explicitly set, upload the file without parsing form-data