Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

s3: fix regression where PutObject fails with non-seekable readers

Chris434edba275b4
diff --git a/backend/s3/s3.go b/backend/s3/s3.go
index 5603ad6a1..ee40cfeec 100644
--- a/backend/s3/s3.go
+++ b/backend/s3/s3.go
@@ -4648,7 +4648,7 @@ func (o *Object) uploadSinglepartPutObject(ctx context.Context, req *s3.PutObjec
if err != nil {
return etag, lastModified, nil, err
}
- req.Body = in
+ req.Body = io.NopCloser(in)
var options = []func(*s3.Options){}
if o.fs.opt.UseUnsignedPayload.Value {
options = append(options, s3.WithAPIOptions(