mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: adapt new uploader for s3 like policy
This commit also fix #730, #713, #756, #5
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user