diff --git a/go_cloud/internal/http/wopi_handlers.go b/go_cloud/internal/http/wopi_handlers.go index 57c9883..930cd58 100644 --- a/go_cloud/internal/http/wopi_handlers.go +++ b/go_cloud/internal/http/wopi_handlers.go @@ -5,6 +5,7 @@ import ( "fmt" "io" "net/http" + "net/url" "strings" "sync" "time" @@ -663,30 +664,33 @@ func collaboraProxyHandler(w http.ResponseWriter, r *http.Request, db *database. // Build WOPISrc URL wopiSrc := fmt.Sprintf("https://go.b0esche.cloud/wopi/files/%s?access_token=%s", fileID, accessToken) + // Build Collabora editor URL with WOPISrc in query string + collaboraEditorURL := fmt.Sprintf("%s/loleaflet/dist/loleaflet.html?WOPISrc=%s", collaboraURL, url.QueryEscape(wopiSrc)) + // Return HTML page with auto-submitting form htmlContent := fmt.Sprintf(`