Skip to content

Commit

Permalink
send storage provider and space id to wopi server (#3074)
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic authored Jul 14, 2022
1 parent 4ad9ffb commit 75f2c2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/send-provider-and-space-to-wopi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Send storage provider and space id to wopi server

We are now concatenating storage provider id and space id into the endpoint that is sent to the wopiserver

https://github.com/cs3org/reva/issues/3074
4 changes: 3 additions & 1 deletion pkg/app/provider/wopi/wopi.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import (
"github.com/cs3org/reva/v2/pkg/mime"
"github.com/cs3org/reva/v2/pkg/rhttp"
"github.com/cs3org/reva/v2/pkg/sharedconf"
"github.com/cs3org/reva/v2/pkg/storagespace"
"github.com/golang-jwt/jwt"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
Expand Down Expand Up @@ -134,8 +135,9 @@ func (p *wopiProvider) GetAppURL(ctx context.Context, resource *provider.Resourc
}

q := httpReq.URL.Query()

q.Add("endpoint", storagespace.FormatStorageID(resource.GetId().GetStorageId(), resource.GetId().GetSpaceId()))
q.Add("fileid", resource.GetId().OpaqueId)
q.Add("endpoint", resource.GetId().SpaceId)
q.Add("viewmode", viewMode.String())

u, ok := ctxpkg.ContextGetUser(ctx)
Expand Down

0 comments on commit 75f2c2f

Please sign in to comment.