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

acd,b2,crypt,drive: add missing upload options

Nick Craig-Woodb5bf819256c2
diff --git a/amazonclouddrive/amazonclouddrive.go b/amazonclouddrive/amazonclouddrive.go
index 3fd21909c..e42d13eb9 100644
--- a/amazonclouddrive/amazonclouddrive.go
+++ b/amazonclouddrive/amazonclouddrive.go
@@ -552,7 +552,7 @@ func (f *Fs) Put(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.
err := o.readMetaData()
switch err {
case nil:
- return o, o.Update(in, src)
+ return o, o.Update(in, src, options...)
case fs.ErrorObjectNotFound:
// Not found so create it
default:
diff --git a/b2/b2.go b/b2/b2.go
index d08dbb4a2..6a37712ee 100644
--- a/b2/b2.go
+++ b/b2/b2.go
@@ -699,7 +699,7 @@ func (f *Fs) Put(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.
fs: f,
remote: src.Remote(),
}
- return fs, fs.Update(in, src)
+ return fs, fs.Update(in, src, options...)
}
// Mkdir creates the bucket if it doesn't exist
diff --git a/crypt/crypt.go b/crypt/crypt.go
index 84e660105..169feadc6 100644
--- a/crypt/crypt.go
+++ b/crypt/crypt.go
@@ -248,7 +248,7 @@ func (f *Fs) Put(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.
if err != nil {
return nil, err
}
- o, err := f.Fs.Put(wrappedIn, f.newObjectInfo(src))
+ o, err := f.Fs.Put(wrappedIn, f.newObjectInfo(src), options...)
if err != nil {
return nil, err
}
diff --git a/drive/drive.go b/drive/drive.go
index 9ec3f0dee..244ebca60 100644
--- a/drive/drive.go
+++ b/drive/drive.go
@@ -673,10 +673,10 @@ func (f *Fs) Put(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.
exisitingObj, err := f.newObjectWithInfo(src.Remote(), nil)
switch err {
case nil:
- return exisitingObj, exisitingObj.Update(in, src)
+ return exisitingObj, exisitingObj.Update(in, src, options...)
case fs.ErrorObjectNotFound:
// Not found so create it
- return f.PutUnchecked(in, src)
+ return f.PutUnchecked(in, src, options...)
default:
return nil, err
}