Let say I have a html form
<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>
and the following go code
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"))
}
}
How do i get the value of "delete"?
part.Header.Get("delete"))
it's not working