Feat: adapt new uploader for s3 like policy

This commit also fix #730, #713, #756, #5
This commit is contained in:
HFO4
2022-03-20 11:29:50 +08:00
parent d3016b60af
commit 7eb8173101
10 changed files with 128 additions and 137 deletions

View File

@@ -1,6 +1,7 @@
package fsctx
import (
"errors"
"io"
"time"
)
@@ -75,7 +76,11 @@ func (file *FileStream) Close() error {
}
func (file *FileStream) Seek(offset int64, whence int) (int64, error) {
return file.Seeker.Seek(offset, whence)
if file.Seekable() {
return file.Seeker.Seek(offset, whence)
}
return 0, errors.New("no seeker")
}
func (file *FileStream) Seekable() bool {