aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/needle/needle_parse_upload.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/storage/needle/needle_parse_upload.go')
-rw-r--r--weed/storage/needle/needle_parse_upload.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/storage/needle/needle_parse_upload.go b/weed/storage/needle/needle_parse_upload.go
index b512c16a2..28de27910 100644
--- a/weed/storage/needle/needle_parse_upload.go
+++ b/weed/storage/needle/needle_parse_upload.go
@@ -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