4

I'm trying to get Wopi host implementation in Ruby on Rails application.

My domain is whitelisted under CSPP. Trying to get the file contents in iframe, but I just see "Word Online" and a loading gif, I return binary file contents of docx as response to ..wopi/files/:id/contents. I don't get any calls hitting my host server.

Sample wopi_src_url: https://word-view.officeapps-df.live.com/wv/wordviewerframe.aspx?ui=1033&rs=1033&dchat=false&IsLicensedUser=0&WOPISrc=https://sgdevwopi.test-wopi.sycamoreinformatics.com/wopi/files/31/contents?access_token=eyJhbGciOiJIUzI1NiJ9.eyJ1c2&access_token_ttl=160000000

enter image description here

Able to get the Wopi validation page in Iframe using .wopitest file. How should I proceed further? Or what am I missing? Please help.

Note: I'm using ngrok to make my local app server visible publicly with whitelisted domain.

4

1 回答 1

3

我发现您的网址存在问题。您必须确保

  • URL 的形式http://server/<...>/wopi/files/(file_id)(所以删除/contents部分 - WOPI 客户端将/contents在必要时自动调用端点)
  • WOPISrc 参数值被编码为 URL 安全字符串

更多信息在这里这里

于 2018-04-16T04:51:49.393 回答