Skip to content

Commit

Permalink
fix: InitiateFileUploadRequest_IfNotExist options has to be set with …
Browse files Browse the repository at this point in the history
…theexplicit value of `true`
  • Loading branch information
DeepDiver1975 committed Feb 20, 2024
1 parent 49b4a9e commit f418de9
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{
true,
}
}
// else {
// the http upload will carry all if-not-match etags
Expand Down

0 comments on commit f418de9

Please sign in to comment.