as the document said, after i call Open() it will return the File interface for access the file part
// 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.
type File interface {
io.Reader
io.ReaderAt
io.Seeker
io.Closer
}
So if the content stored on disk, I can use type assertion and call Stat() to get its size.
but the problem is if the content stored in memory, it will return an unexported struct sectionReadCloser
type sectionReadCloser struct {
*io.SectionReader
}
The io.SectionReader has the method Size(), but is there any way to call it?
Thank you, and sorry for my poor English :)