Commit f63ffb28 authored by Boris Kocherov's avatar Boris Kocherov

erp5_officejs_ooffice: save filename for onlyoffice documents

parent 3fb7635f
...@@ -46,6 +46,9 @@ ...@@ -46,6 +46,9 @@
} else { } else {
doc = gadget.state.doc; doc = gadget.state.doc;
doc.content_type = "application/x-asc-presentation"; doc.content_type = "application/x-asc-presentation";
if (!doc.filename) {
doc.filename = (doc.reference || doc.title || "default") + ".ppty";
}
return gadget.jio_putAttachment( return gadget.jio_putAttachment(
gadget.state.jio_key, gadget.state.jio_key,
"data", "data",
......
...@@ -46,6 +46,9 @@ ...@@ -46,6 +46,9 @@
} else { } else {
doc = gadget.state.doc; doc = gadget.state.doc;
doc.content_type = "application/x-asc-spreadsheet"; doc.content_type = "application/x-asc-spreadsheet";
if (!doc.filename) {
doc.filename = (doc.reference || doc.title || "default") + ".xlsy";
}
return gadget.jio_putAttachment( return gadget.jio_putAttachment(
gadget.state.jio_key, gadget.state.jio_key,
"data", "data",
......
...@@ -46,6 +46,9 @@ ...@@ -46,6 +46,9 @@
} else { } else {
doc = gadget.state.doc; doc = gadget.state.doc;
doc.content_type = "application/x-asc-text"; doc.content_type = "application/x-asc-text";
if (!doc.filename) {
doc.filename = (doc.reference || doc.title || "default") + ".docy";
}
return gadget.jio_putAttachment( return gadget.jio_putAttachment(
gadget.state.jio_key, gadget.state.jio_key,
"data", "data",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment