2022-06-15 10:06:42 +00:00
|
|
|
package model
|
|
|
|
|
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
)
|
|
|
|
|
|
|
|
type FileStream struct {
|
2022-06-15 12:41:17 +00:00
|
|
|
Obj
|
2022-06-15 10:06:42 +00:00
|
|
|
io.ReadCloser
|
2022-07-01 07:04:02 +00:00
|
|
|
Mimetype string
|
|
|
|
WebPutAsTask bool
|
2022-12-17 11:49:05 +00:00
|
|
|
Old Obj
|
2022-06-15 10:06:42 +00:00
|
|
|
}
|
|
|
|
|
2022-09-03 12:34:06 +00:00
|
|
|
func (f *FileStream) GetMimetype() string {
|
2022-06-15 10:06:42 +00:00
|
|
|
return f.Mimetype
|
|
|
|
}
|
2022-07-01 07:04:02 +00:00
|
|
|
|
2022-09-03 12:34:06 +00:00
|
|
|
func (f *FileStream) NeedStore() bool {
|
2022-07-01 07:04:02 +00:00
|
|
|
return f.WebPutAsTask
|
|
|
|
}
|
|
|
|
|
|
|
|
func (f *FileStream) GetReadCloser() io.ReadCloser {
|
|
|
|
return f.ReadCloser
|
|
|
|
}
|
|
|
|
|
|
|
|
func (f *FileStream) SetReadCloser(rc io.ReadCloser) {
|
|
|
|
f.ReadCloser = rc
|
|
|
|
}
|
2022-12-17 11:49:05 +00:00
|
|
|
|
|
|
|
func (f *FileStream) GetOld() Obj {
|
|
|
|
return f.Old
|
|
|
|
}
|