"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
hubic: fix uploads - fixes #2524
Nick Craig-Woodc644241392c7
diff --git a/backend/hubic/hubic.go b/backend/hubic/hubic.goindex 6419315fc..955ab7d3d 100644--- a/backend/hubic/hubic.go+++ b/backend/hubic/hubic.go@@ -60,13 +60,13 @@ func init() {log.Fatalf("Failed to configure token: %v", err)}},- Options: []fs.Option{{+ Options: append([]fs.Option{{Name: config.ConfigClientID,Help: "Hubic Client Id\nLeave blank normally.",}, {Name: config.ConfigClientSecret,Help: "Hubic Client Secret\nLeave blank normally.",- }},+ }}, swift.SharedOptions...),})}diff --git a/backend/swift/swift.go b/backend/swift/swift.goindex 57c008307..a490b2077 100644--- a/backend/swift/swift.go+++ b/backend/swift/swift.go@@ -31,13 +31,21 @@ const (listChunks = 1000 // chunk size to read directory listings)+// SharedOptions are shared between swift and hubic+var SharedOptions = []fs.Option{{+ Name: "chunk_size",+ Help: "Above this size files will be chunked into a _segments container.",+ Default: fs.SizeSuffix(5 * 1024 * 1024 * 1024),+ Advanced: true,+}}+// Register with Fsfunc init() {fs.Register(&fs.RegInfo{Name: "swift",Description: "Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)",NewFs: NewFs,- Options: []fs.Option{{+ Options: append([]fs.Option{{Name: "env_auth",Help: "Get swift credentials from environment variables in standard OpenStack form.",Default: false,@@ -134,12 +142,7 @@ func init() {Help: "OVH Public Cloud Archive",Value: "pca",}},- }, {- Name: "chunk_size",- Help: "Above this size files will be chunked into a _segments container.",- Default: fs.SizeSuffix(5 * 1024 * 1024 * 1024),- Advanced: true,- }},+ }}, SharedOptions...),})}@@ -291,7 +294,7 @@ func swiftConnection(opt *Options, name string) (*swift.Connection, error) {return c, nil}-// NewFsWithConnection contstructs an Fs from the path, container:path+// NewFsWithConnection constructs an Fs from the path, container:path// and authenticated connection.//// if noCheckContainer is set then the Fs won't check the container