Currently, the WOPIJsonEnricher does nothing if there is no file:content Blob or if it cannot be opened with Office Online.
As we want to be able to open any document's blob supported by Office Online, we need to rework/rethink the enricher.
Even if it is easy to compute the right URL for any blob with the base URL given by the enricher, it's not possible if there is no file:content blob or if it cannot be opened by Office Online.
Moreover, the appName could be different for each blob.
The format of the enricher could be:
... "wopi": { "file:content": { "view": "http://localhost:8080/nuxeo/wopi/view/default/22a28e55-a265-4c2f-b948-c12ed58bf5c1/file:content", "edit": "http://localhost:8080/nuxeo/wopi/edit/default/22a28e55-a265-4c2f-b948-c12ed58bf5c1/file:content", "appName": "PowerPoint", "locked": true|false }, "files:files/0/file": { "view": "http://localhost:8080/nuxeo/wopi/view/default/22a28e55-a265-4c2f-b948-c12ed58bf5c1/file:content", "appName": "Excel", "locked": true|false }, ... } ...
Rework the Web UI module to leverage the new enricher.