Skip to content

Commit

Permalink
Merge pull request #4528 from DeepDiver1975/fix/cs3-metadata-upload-i…
Browse files Browse the repository at this point in the history
…fnotexists

fix: InitiateFileUploadRequest_IfNotExist options has to be set with …
  • Loading branch information
butonic authored Feb 20, 2024
2 parents 49b4a9e + 554384d commit 283b39b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bugfix: Respect IfNotExist option when uploading in cs3 metadata storage

https://github.com/cs3org/reva/pull/4528
4 changes: 3 additions & 1 deletion pkg/storage/utils/metadata/cs3.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
IfNotExist: true,
}
}
// else {
// the http upload will carry all if-not-match etags
Expand Down

0 comments on commit 283b39b

Please sign in to comment.