wopi: fix onlyoffice opening docs in readonly mode (#1585)

This commit is contained in:
Danila Kamaev
2026-08-03 22:02:18 +00:00
committed by GitHub
parent b9405a3e25
commit fdf52a8c4e
+3 -1
View File
@@ -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="