Fixed onlyoffice connection issues
All checks were successful
Automated Container Build / build-and-push (push) Successful in 41s

This commit is contained in:
Elijah 2026-05-24 11:19:25 -07:00
parent 42f07feb23
commit e1fdbd9388

View file

@ -47,6 +47,8 @@ export default function OnlyOfficeEditor({ file, type, onClose }: OnlyOfficeEdit
const API_BASE = getApiBase();
const docServerUrl = 'https://office.elijahkuntz.com/';
// URL that OnlyOffice will use to download the file
const fileUrl = `${API_BASE}/api/files/download/?path=${encodeURIComponent(file.path)}&token=${downloadToken}`;
@ -106,7 +108,7 @@ export default function OnlyOfficeEditor({ file, type, onClose }: OnlyOfficeEdit
) : (
<DocumentEditor
id="docxEditor"
documentServerUrl={typeof window !== 'undefined' ? (window.location.protocol === 'https:' ? `https://${window.location.hostname}:4430/` : `http://${window.location.hostname}:8084/`) : "http://192.168.50.81:8084/"}
documentServerUrl={docServerUrl}
config={config as any}
events_onDocumentReady={onDocumentReady}
onLoadComponentError={onLoadComponentError}