Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send storage provider and space id to wopi server #3074

Merged
merged 1 commit into from
Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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