I have implemented WOPI in my Vue.js app and implemented a GET API in Node.js to return the file content, still iam unable to see the content in DOC viewer in front-end and there are no errors even, attached screenshot of UI here: UI DOC Viewer
The following is the action URL sample that i tried. https://ffc-word-view.officeapps.live.com/wv/wordviewerframe.aspx?wopisrc=https://app.maindomain.com/file/v1/wopi/files/1269474
The following is the API Code which i wrote to read a file from Azure Blob storage and to return the file content:
var request = require('request');
request.get('<FILE_BLOB_URL>',{responseType: 'arraybuffer'}, function (error, response, body) {
if (!error && response.statusCode == 200) {
let json = JSON.stringify(body);
let bufferOriginal = Buffer.from(JSON.parse(json));
res.status(200).send(bufferOriginal)
}else{
console.log('WOPI Files Content Read Err is:');
console.log(error);
}
});
Can anyone suggest me the that the way that iam returning the file content is correct or not?
I have implemented '/wopi/files/:FID' API only for time-being, to get this working do i need to implement other endpoints also which were proposed in CSPP document?
To get the View mode working, you need at least:
To support the Edit mode, you need: