0
votes

We are integrating Office Online with our application to open Open Microsoft Office files(.docx, .xls, .pptx, etc.). To do that, we use the WOPI protocol.

These files can be local files or files hosted on SharePoint.
For SharePoint files to open them with office online through our application, we have to perform the following steps:

  1. the control comes to WOPI getFileInformationCall
  2. we need to hit the Microsoft graph API to download the file
  3. we read the file and return the file information from the REST call.

This all steps take time and are a bit fragile. Does anyone know if there is a way to redirect WOPI REST calls to get SharePoint files? Or is there another way to optimize these steps?

1

1 Answers

1
votes

You can return FileUrl as a property returned from CheckFileInfo operation.

FileUrl is a URI to the file location that the WOPI client uses to get the file. If this is provided, the WOPI client may use this URI to get the file instead of a GetFile request.