mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 14:20:55 +03:00
s3: implement multipart downloads without using the S3 Manager
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -915,7 +915,7 @@ func (fs *AzureBlobFs) downloadPart(ctx context.Context, blockBlob *blockblob.Cl
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = fs.writeAtFull(w, buf, writeOffset, int(count))
|
||||
_, err = writeAtFull(w, buf, writeOffset, int(count))
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1105,18 +1105,6 @@ func (fs *AzureBlobFs) handleMultipartUpload(ctx context.Context, reader io.Read
|
||||
return err
|
||||
}
|
||||
|
||||
func (*AzureBlobFs) writeAtFull(w io.WriterAt, buf []byte, offset int64, count int) (int, error) {
|
||||
written := 0
|
||||
for written < count {
|
||||
n, err := w.WriteAt(buf[written:count], offset+int64(written))
|
||||
written += n
|
||||
if err != nil {
|
||||
return written, err
|
||||
}
|
||||
}
|
||||
return written, nil
|
||||
}
|
||||
|
||||
func (fs *AzureBlobFs) getCopyOptions(srcInfo os.FileInfo, updateModTime bool) *blob.StartCopyFromURLOptions {
|
||||
copyOptions := &blob.StartCopyFromURLOptions{}
|
||||
if fs.config.AccessTier != "" {
|
||||
|
||||
Reference in New Issue
Block a user