Skip to content

Commit

Permalink
Fix setting the lock for file uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
aduffeck committed Feb 4, 2022
1 parent 174e2ad commit 85011e6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/grpc/services/storageprovider/storageprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,13 @@ func (s *service) InitiateFileUpload(ctx context.Context, req *provider.Initiate
}, nil
}

// FIXME these should be part of the InitiateFileUploadRequest object
if req.Opaque != nil {
if e, ok := req.Opaque.Map["lockid"]; ok && e.Decoder == "plain" {
ctx = ctxpkg.ContextSetLockID(ctx, string(e.Value))
}
}

metadata := map[string]string{}
var uploadLength int64
if req.Opaque != nil && req.Opaque.Map != nil {
Expand Down

0 comments on commit 85011e6

Please sign in to comment.