Fixed onlyoffice connection issues
All checks were successful
Automated Container Build / build-and-push (push) Successful in 41s
All checks were successful
Automated Container Build / build-and-push (push) Successful in 41s
This commit is contained in:
parent
42f07feb23
commit
e1fdbd9388
1 changed files with 3 additions and 1 deletions
|
|
@ -47,6 +47,8 @@ export default function OnlyOfficeEditor({ file, type, onClose }: OnlyOfficeEdit
|
||||||
|
|
||||||
const API_BASE = getApiBase();
|
const API_BASE = getApiBase();
|
||||||
|
|
||||||
|
const docServerUrl = 'https://office.elijahkuntz.com/';
|
||||||
|
|
||||||
// URL that OnlyOffice will use to download the file
|
// URL that OnlyOffice will use to download the file
|
||||||
const fileUrl = `${API_BASE}/api/files/download/?path=${encodeURIComponent(file.path)}&token=${downloadToken}`;
|
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
|
<DocumentEditor
|
||||||
id="docxEditor"
|
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}
|
config={config as any}
|
||||||
events_onDocumentReady={onDocumentReady}
|
events_onDocumentReady={onDocumentReady}
|
||||||
onLoadComponentError={onLoadComponentError}
|
onLoadComponentError={onLoadComponentError}
|
||||||
|
|
|
||||||
Reference in a new issue