Use blob URL to load an OnlyOffice document

This commit is contained in:
yflory
2018-03-26 16:42:09 +02:00
parent a794efe931
commit 714c46fc2e
2 changed files with 9 additions and 4 deletions

View File

@@ -69,15 +69,15 @@ module.exports.install = function(server, port, callbackFunction) {
if (data.type !== 'auth') { return; }
console.log("Response auth");
var fileUrl = origin + "oodoc/test.bin";
var fileUrl = data.openCmd.url;//origin + "oodoc/test.bin";
if (data.openCmd) {
/*if (data.openCmd) {
if (data.openCmd.format === "xlsx") {
fileUrl = origin + "oocell/test.bin";
} else if (data.openCmd.format === "pptx") {
fileUrl = origin + "ooslide/test.bin";
}
}
}*/
sendData(conn, {"type":"auth","result":1,"sessionId":"08e77705-dc5c-477d-b73a-b1a7cbca1e9b","sessionTimeConnect":1494226099270,"participants":[]});
sendData(conn, {"type":"documentOpen","data":{"type":"open","status":"ok","data":{"Editor.bin":fileUrl}}});
} catch (e) {