maybe some code will clear my intent:
buf := new(bytes.Buffer )
w := multipart.NewWriter(buf)
w.WriteField("content", "abcd" )
w.WriteField("content2", "1234" )
w.CreateFormFile("image0", "C:/example.jpg" )
w.Close()
after this. i print the buf:
fmt.Println( string(buf.Bytes()) )
--boudnary
Content-Disposition: form-data; name="content"
abcd
--boudnary
Content-Disposition: form-data; name="content2"
1234
--boundary
Content-Disposition: form-data; name="image0"; filename= "c:/example.jpg"
"Content-Type: image/jpeg"
//placeholder(add by me)
--boundary--
i want to see the placeholder is the binary data for "C:/example.jpg", but it is nothing, SO how to add the binary data to the multipart.