mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
commands/http: Ignore mediatype validation (only required for file args)
This commit is contained in:
parent
9333c504c1
commit
ce49541f13
@ -92,10 +92,8 @@ func Parse(r *http.Request, root *cmds.Command) (cmds.Request, error) {
|
||||
|
||||
// create cmds.File from multipart/form-data contents
|
||||
contentType := r.Header.Get(contentTypeHeader)
|
||||
mediatype, _, err := mime.ParseMediaType(contentType)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
mediatype, _, _ := mime.ParseMediaType(contentType)
|
||||
|
||||
var f *cmds.MultipartFile
|
||||
if mediatype == "multipart/form-data" {
|
||||
f = &cmds.MultipartFile{Mediatype: mediatype}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user