Feat: {path} marker in name rule representing the virtual path of the file

This commit is contained in:
HFO4
2019-11-19 16:42:36 +08:00
parent 2e9f256462
commit 88a543ef74
8 changed files with 71 additions and 33 deletions

View File

@ -33,11 +33,16 @@ func (file FileData) GetFileName() string {
return file.Name
}
func (file FileData) GetVirtualPath() string {
return file.Name
}
type FileStream struct {
File io.ReadCloser
Size uint64
Name string
MIMEType string
File io.ReadCloser
Size uint64
VirtualPath string
Name string
MIMEType string
}
func (file FileStream) Read(p []byte) (n int, err error) {
@ -59,3 +64,7 @@ func (file FileStream) Close() error {
func (file FileStream) GetFileName() string {
return file.Name
}
func (file FileStream) GetVirtualPath() string {
return file.VirtualPath
}