#send excel from json body to golang backend
5 messages · Page 1 of 1 (latest)
If it's a multipart/form data request then you just use the parse form and form file methods to get it from the body
"you just use the parse form and form file methods to get it from the body"
what would be the resulting data type after parsing from the body?
func (r *Request) FormFile(key string) (multipart.File, *multipart.FileHeader, error)
FormFile returns the first file for the provided form key. FormFile calls ParseMultipartForm and ParseForm if necessary.
type File interface {
io.Reader
io.ReaderAt
io.Seeker
io.Closer
}
File is an interface to access the file part of a multipart message. Its contents may be either stored in memory or on disk. If stored on disk, the File's underlying concrete type will be an *os.File.