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

combine,compress,crypt,hasher,union: support wrapping backends with PartialUploads

Nick Craig-Wood3faa84b47c6e
diff --git a/backend/combine/combine.go b/backend/combine/combine.go
index f83a3c486..d0e747376 100644
--- a/backend/combine/combine.go
+++ b/backend/combine/combine.go
@@ -233,6 +233,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (outFs fs
ReadMetadata: true,
WriteMetadata: true,
UserMetadata: true,
+ PartialUploads: true,
}).Fill(ctx, f)
canMove := true
for _, u := range f.upstreams {
diff --git a/backend/compress/compress.go b/backend/compress/compress.go
index 21ab99c03..6d99604b8 100644
--- a/backend/compress/compress.go
+++ b/backend/compress/compress.go
@@ -186,6 +186,7 @@ func NewFs(ctx context.Context, name, rpath string, m configmap.Mapper) (fs.Fs,
ReadMetadata: true,
WriteMetadata: true,
UserMetadata: true,
+ PartialUploads: true,
}).Fill(ctx, f).Mask(ctx, wrappedFs).WrapsFs(f, wrappedFs)
// We support reading MIME types no matter the wrapped fs
f.features.ReadMimeType = true
diff --git a/backend/crypt/crypt.go b/backend/crypt/crypt.go
index 0fec3f013..5b8ff2c8a 100644
--- a/backend/crypt/crypt.go
+++ b/backend/crypt/crypt.go
@@ -268,6 +268,7 @@ func NewFs(ctx context.Context, name, rpath string, m configmap.Mapper) (fs.Fs,
ReadMetadata: true,
WriteMetadata: true,
UserMetadata: true,
+ PartialUploads: true,
}).Fill(ctx, f).Mask(ctx, wrappedFs).WrapsFs(f, wrappedFs)
return f, err
diff --git a/backend/hasher/hasher.go b/backend/hasher/hasher.go
index e80daedee..3428b4dc2 100644
--- a/backend/hasher/hasher.go
+++ b/backend/hasher/hasher.go
@@ -166,6 +166,7 @@ func NewFs(ctx context.Context, fsname, rpath string, cmap configmap.Mapper) (fs
ReadMetadata: true,
WriteMetadata: true,
UserMetadata: true,
+ PartialUploads: true,
}
f.features = stubFeatures.Fill(ctx, f).Mask(ctx, f.Fs).WrapsFs(f, f.Fs)
diff --git a/backend/union/union.go b/backend/union/union.go
index 268860621..c87b6e2d7 100644
--- a/backend/union/union.go
+++ b/backend/union/union.go
@@ -902,6 +902,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
ReadMetadata: true,
WriteMetadata: true,
UserMetadata: true,
+ PartialUploads: true,
}).Fill(ctx, f)
canMove, slowHash := true, false
for _, f := range upstreams {