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

fichier: check if more than one upload link is returned #5152

Nick Craig-Wood886dfd23e24d
diff --git a/backend/fichier/fichier.go b/backend/fichier/fichier.go
index 4dcef4eee..5a1c2aea2 100644
--- a/backend/fichier/fichier.go
+++ b/backend/fichier/fichier.go
@@ -348,8 +348,10 @@ func (f *Fs) putUnchecked(ctx context.Context, in io.Reader, remote string, size
return nil, err
}
- if len(fileUploadResponse.Links) != 1 {
- return nil, errors.New("unexpected amount of files")
+ if len(fileUploadResponse.Links) == 0 {
+ return nil, errors.New("upload response not found")
+ } else if len(fileUploadResponse.Links) > 1 {
+ fs.Debugf(remote, "Multiple upload responses found, using the first")
}
link := fileUploadResponse.Links[0]