6.1 Beta: OnlyOffice Callback Error


#1

New user here. Have been mucking around with OnlyOffice integration and I keep running into an error every time I try to open a file through the Document Server:

Looking through the logs, it looks like the OnlyOffice editor uses an HTTP callback URL ("callbackUrl": "http://seafile.somewhere.org/onlyoffice/editor-callback/"), but my Seafile installation redirects to HTTPS, so all that OnlyOffice sees is a 301 permanent redirect and throws an error. Is it possible to change a parameter so that this callback is done via HTTPS?


#2

To answer my own question, turns out I had not configured ccnet.conf correctly (it was still pointing to HTTP rather than HTTPS). After fixing this, everything works smoothly :smiley:


#3

Hello, mrboh!
I’m Enelvin. I have a problem…

I am trying to follow the ‘Basic Concepts’ page of the Document Server for me to integrate the API into my own website. I have the document server running and i can test that using the index.html that comes with the onlyoffice document server installation.

Now when trying to incorporate the API, im running into trivial issues that i cant seem to hurdle over because the ‘Basic Concepts’ page is not so basic.

I can fully comprehend what these 2 lines of HTML code mean:

<div id="placeholder"></div>
<script type="text/javascript" src="http://documentserver/web-apps/apps/api/documents/api.js"></script>

creating a div tag that will contain the editor once its instantiated, and a script to call the API. now i did change the ‘documentserver’ to my ip address.
the next part is where im having trouble…
i assume we declare the config object as so:

config = {
				"document": {
					"fileType": "docx",
					"key": "Khirz6zTPdfd7",
					"title": "Documento de Exemplo.docx",
					"url": "http://localhost:8080/url-to-example-document.docx"
				},
				"documentType": "text",
				"editorConfig": {
					"callbackUrl": "http://localhost:8080/url-to-callback.ashx"
				}
			};

The issue im having is i dont understand what the callbackUrl is supposed to be.
in the document property… i declared the title the same name as a sample docx file i have in the directory of my webserver.
I declared the url to be: http://webserver_ip_address/example.docx because this is where my sample docx is located

I’m not sure what to put in for the callbackURL though. I am trying to get this running asap and would love to have this resolved immediately.

Your help is kindly appreciated.