mirror of
https://github.com/9001/copyparty.git
synced 2026-09-25 06:40:18 +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")
|
||||
xroot = parse_xml(xml)
|
||||
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(("?", "&")):
|
||||
url += "&" if "?" in url else "?"
|
||||
url += "WOPISrc="
|
||||
|
||||
Reference in New Issue
Block a user