0

I have done a WOPI integration with my application for Office Online 365. Now, when a user closes the IFrame, an "Unlock" call will get executed. Based on the "Unlock" call, it will be considered that the session will become inactive hence document will no longer exist for editing. Then, when a refresh popup shows up after a few minutes before the TTL expires and a user clicks the refresh button, the client makes an "Unlock" call. So how can I identify whether it's a refresh call or an IFrame's close event?

rocky
  • 7,506
  • 3
  • 33
  • 48
Rahul Rabhadiya
  • 430
  • 5
  • 19
  • 1) How can a user click "refresh" when the frame is closed? 2) Why would you want to distinguish between the two events? 2a) Why don't you just implement what's asked from you in the [documentation](http://wopi.readthedocs.io/projects/wopirest/en/latest/files/Unlock.html). – rocky May 21 '18 at 11:33
  • @rocky when user close frame then we change version for file in our application. How we are doing it , wopi host gets unlock call whenever user close frame , and when user click on refresh button of TTL expiry alert dialogue , wopi host gets unlock call at that time also but we dont want to consider new version of a file. Thats why want to distinguish between refresh or close event. There is no explicit handling of that ttl expiry event thats causes trouble . – Rahul Rabhadiya May 21 '18 at 14:12
  • Could you perhaps add some screenshots to illustrate the situation better? It's not clear to me from what you've written. Thanks – rocky May 24 '18 at 07:31

1 Answers1

0

In order for the Refresh button to work, you need to set HostEditUrl and HostViewUrl in the CheckFileInfo response. the HostEditUrl and HostViewUrl are where the user is redirected when they click the Refresh button.

CascadiaJS
  • 2,320
  • 2
  • 26
  • 46