diff --git a/go_cloud/internal/http/wopi_handlers.go b/go_cloud/internal/http/wopi_handlers.go index 77699a3..aafb1c9 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,47 +664,51 @@ 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) - // Return HTML page with auto-submitting form - // Collabora requires: POST to /loleaflet/dist/loleaflet.html with WOPISrc in request body + // Build Collabora editor URL with WOPISrc in query string + editorURL := fmt.Sprintf("%s/loleaflet/dist/loleaflet.html?WOPISrc=%s&closebutton=1", collaboraURL, url.QueryEscape(wopiSrc)) + + // Return HTML page that loads Collabora in an iframe htmlContent := fmt.Sprintf(`
Loading Collabora Online...
+