Cloud backends: add support for FTP REST command

So partial downloads are now supported as for local fs
This commit is contained in:
Nicola Murino
2020-08-03 18:03:09 +02:00
parent 8839c34d53
commit fa41bfd06a
12 changed files with 74 additions and 45 deletions

View File

@@ -66,7 +66,7 @@ func (c *Connection) Fileread(request *sftp.Request) (io.ReaderAt, error) {
return nil, c.GetFsError(err)
}
file, r, cancelFn, err := c.Fs.Open(p)
file, r, cancelFn, err := c.Fs.Open(p, 0)
if err != nil {
c.Log(logger.LevelWarn, "could not open file %#v for reading: %+v", p, err)
return nil, c.GetFsError(err)