Update Collabora URL generation in publicFileShareHandler for improved document viewing

This commit is contained in:
Leon Bösche
2026-01-25 19:30:53 +01:00
parent 3854234a3c
commit c91eaa7db9
2 changed files with 2 additions and 1 deletions

Binary file not shown.

View File

@@ -3011,7 +3011,8 @@ func publicFileShareHandler(w http.ResponseWriter, r *http.Request, db *database
} else if strings.Contains(mimeType, "document") || strings.Contains(mimeType, "word") || strings.Contains(mimeType, "spreadsheet") || strings.Contains(mimeType, "presentation") {
// Use Collabora for document viewing
wopiSrc := fmt.Sprintf("%s://go.b0esche.cloud/public/wopi/share/%s", scheme, token)
collaboraUrl := fmt.Sprintf("https://of.b0esche.cloud/lool/dist/mobile/cool.html?WOPISrc=%s", url.QueryEscape(wopiSrc))
editorUrl := getCollaboraEditorURL("https://of.b0esche.cloud")
collaboraUrl := fmt.Sprintf("%s?WOPISrc=%s", editorUrl, url.QueryEscape(wopiSrc))
viewerSession["viewUrl"] = collaboraUrl
}