diff --git a/changelog/unreleased/fix-metadata-storage-upload-ifnotexist.md b/changelog/unreleased/fix-metadata-storage-upload-ifnotexist.md new file mode 100644 index 00000000000..295a2a1b8da --- /dev/null +++ b/changelog/unreleased/fix-metadata-storage-upload-ifnotexist.md @@ -0,0 +1,3 @@ +Bugfix: Respect IfNotExist option when uploading in cs3 metadata storage + +https://github.com/cs3org/reva/pull/4528 diff --git a/pkg/storage/utils/metadata/cs3.go b/pkg/storage/utils/metadata/cs3.go index c39cae9e0e4..bb41c90bcff 100644 --- a/pkg/storage/utils/metadata/cs3.go +++ b/pkg/storage/utils/metadata/cs3.go @@ -165,7 +165,9 @@ func (cs3 *CS3) Upload(ctx context.Context, req UploadRequest) (*UploadResponse, } if len(req.IfNoneMatch) > 0 { if req.IfNoneMatch[0] == "*" { - ifuReq.Options = &provider.InitiateFileUploadRequest_IfNotExist{} + ifuReq.Options = &provider.InitiateFileUploadRequest_IfNotExist{ + true, + } } // else { // the http upload will carry all if-not-match etags