From fdf52a8c4e1d8cb6ac8687c0b46ee131ccd9592b Mon Sep 17 00:00:00 2001 From: Danila Kamaev Date: Tue, 4 Aug 2026 02:02:18 +0400 Subject: [PATCH] wopi: fix onlyoffice opening docs in readonly mode (#1585) --- copyparty/httpcli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index db43defb..79c72b21 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -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="