If the SetRendition call to OC fails, then the link to download the native content doesn't actually get displayed in Stage.
This call doesnt actually return a error response if it is unable to render the document. Therefore this isnt that common. But it could still error out if the user doesnt have write permissions to the document.
If the actual setRendition call is bombing out (for example, because we dont have write permissions to the document since its already declared a record in our case) we still want that download link to show up. It wont show up however because we define a success callback but not a failure callback. So if that rest call fails we just stop and don't display anything in the stage.
In contentViewer.js:
Solution would be to add a failure callback that just displays the link to download the native content in stage.
If the SetRendition call to OC fails, then the link to download the native content doesn't actually get displayed in Stage.
This call doesnt actually return a error response if it is unable to render the document. Therefore this isnt that common. But it could still error out if the user doesnt have write permissions to the document.
If the actual setRendition call is bombing out (for example, because we dont have write permissions to the document since its already declared a record in our case) we still want that download link to show up. It wont show up however because we define a success callback but not a failure callback. So if that rest call fails we just stop and don't display anything in the stage.
In contentViewer.js:
Solution would be to add a failure callback that just displays the link to download the native content in stage.