Add: filesystem

This commit is contained in:
HFO4
2019-11-16 13:37:42 +08:00
parent d86a3533ca
commit 003274162b
6 changed files with 106 additions and 12 deletions

View File

@@ -0,0 +1,26 @@
package local
import "mime/multipart"
// FileData 上传的文件数据
type FileData struct {
File multipart.File
Size uint64
MIMEType string
}
func (file FileData) Read(p []byte) (n int, err error) {
return file.Read(p)
}
func (file FileData) GetMIMEType() string {
return file.MIMEType
}
func (file FileData) GetSize() uint64 {
return file.Size
}
func (file FileData) Close() error {
return file.Close()
}

View File

@@ -0,0 +1 @@
package local