假设我有一个 html 表单
<form enctype="multipart/form-data" action="http://localhost:8080/incarcat" method="post">
<input type="file" name="file" multiple="multiple"/>
<input type="checkbox" name="delete" value="delete">
<input type="submit" value="Load" />
</form>
和以下代码
read_form, err := req.MultipartReader()
for {
part, err_part := read_form.NextPart()
if err_part == io.EOF {
break
}
if part.FormName() == "file" {
//do something with files
} else if part.FormName() == "delete" {
//curata_folder()
log.Println("delete is: ", part.Header.Get("delete"))
}
}
我如何获得“删除”的价值?
part.Header.Get("delete"))
它不工作
侃侃尔雅
冉冉说
相关分类