"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
fichier: pass options to rest.Opts for uploadFile
Tim Gallantfc946d0c44ca
diff --git a/backend/fichier/api.go b/backend/fichier/api.goindex 73fcfc597..4454e0421 100644--- a/backend/fichier/api.go+++ b/backend/fichier/api.go@@ -320,7 +320,7 @@ func (f *Fs) getUploadNode(ctx context.Context) (response *GetUploadNodeResponsereturn response, err}-func (f *Fs) uploadFile(ctx context.Context, in io.Reader, size int64, fileName, folderID, uploadID, node string) (response *http.Response, err error) {+func (f *Fs) uploadFile(ctx context.Context, in io.Reader, size int64, fileName, folderID, uploadID, node string, options ...fs.OpenOption) (response *http.Response, err error) {// fs.Debugf(f, "Uploading File `%s`", fileName)fileName = f.opt.Enc.FromStandardName(fileName)@@ -338,6 +338,7 @@ func (f *Fs) uploadFile(ctx context.Context, in io.Reader, size int64, fileName,NoResponse: true,Body: in,ContentLength: &size,+ Options: options,MultipartContentName: "file[]",MultipartFileName: fileName,MultipartParams: map[string][]string{diff --git a/backend/fichier/fichier.go b/backend/fichier/fichier.goindex f237af48e..3f0da19a6 100644--- a/backend/fichier/fichier.go+++ b/backend/fichier/fichier.go@@ -338,7 +338,7 @@ func (f *Fs) putUnchecked(ctx context.Context, in io.Reader, remote string, sizereturn nil, err}- _, err = f.uploadFile(ctx, in, size, leaf, directoryID, nodeResponse.ID, nodeResponse.URL)+ _, err = f.uploadFile(ctx, in, size, leaf, directoryID, nodeResponse.ID, nodeResponse.URL, options...)if err != nil {return nil, err}