mirror of
https://github.com/9001/copyparty.git
synced 2026-10-05 21:41:39 +01:00
wopi: fix onlyoffice opening docs in readonly mode (#1585)
This commit is contained in:
@@ -1682,7 +1682,9 @@ class HttpCli(object):
|
|||||||
xml = buf.decode(enc, "replace")
|
xml = buf.decode(enc, "replace")
|
||||||
xroot = parse_xml(xml)
|
xroot = parse_xml(xml)
|
||||||
ext = vpath.split(".")[-1]
|
ext = vpath.split(".")[-1]
|
||||||
url = xroot.find(".//action[@ext='%s'][@urlsrc]" % (ext,)).get("urlsrc")
|
url = xroot.find(
|
||||||
|
".//action[@ext='%s'][@name='edit'][@urlsrc]" % (ext,)
|
||||||
|
).get("urlsrc")
|
||||||
if not url.endswith(("?", "&")):
|
if not url.endswith(("?", "&")):
|
||||||
url += "&" if "?" in url else "?"
|
url += "&" if "?" in url else "?"
|
||||||
url += "WOPISrc="
|
url += "WOPISrc="
|
||||||
|
|||||||
Reference in New Issue
Block a user