Try the fastest and simplest way to install ONLYOFFICE

Callback Url

Integration questions/issues

Callback Url

Postby moua » Mon Jun 22, 2015 9:43 am

Hi,
i have installed Onlyoffice Document Server on Unbuntu and it's working fine?

My purpose is to get the modified document to copy it in a specific folder, but i have a problem with the callback url.

It seems that this url is never called because some logs should be created but it's not the case.

I have read in the api documentation that it is called 10 second after the document is closed but how do you when the document is close ?
There is no "close" button, is it when you close the browser ?

Thanks for your help.
moua
 
Posts: 7
Joined: Mon Jun 22, 2015 9:35 am

Re: Callback Url

Postby Dean » Mon Jun 22, 2015 11:32 am

Saving of the document method is called in ten seconds after the last person editing it closes the document tab in browser.
Dean
 
Posts: 700
Joined: Tue Sep 30, 2014 11:04 am

Re: Callback Url

Postby moua » Tue Jun 23, 2015 7:40 am

Thank you for your reply.

After many tests, i think the callback url is never called on my installation and can't see why.

In the callback url of the php example (that i use), il see many call to the "sendlog" function, which write in the logs directory but no corresponding file has bee created.

And there is no problem with the directory rights because the php example is able to create and write in the common log, created by the same "sendlog" function.

If someone has an idea.

Thank you.
moua
 
Posts: 7
Joined: Mon Jun 22, 2015 9:35 am

Re: Callback Url

Postby Dean » Tue Jun 23, 2015 1:29 pm

Could you please specify the Callback URL itself and specify if it is accessible from the Editors server side?

Also specify your PHP version, please.
Dean
 
Posts: 700
Joined: Tue Sep 30, 2014 11:04 am

Re: Callback Url

Postby moua » Tue Jun 23, 2015 1:45 pm

There is a public adress for my tests :
http://178.32.249.86 -> the document server
http://178.32.249.86:81/onlyoffice_php/ -> the php example

The callback url is the default url of the example, i have not changed it.

The PHp version : PHP Version 5.6.4-4ubuntu6 (phpinfo avaible at http://178.32.249.86:81/)

I user directly this url for my tests : http://178.32.249.86:81/onlyoffice_php/ ... =demo.docx
The file is already modified.
moua
 
Posts: 7
Joined: Mon Jun 22, 2015 9:35 am

Re: Callback Url

Postby moua » Tue Jun 23, 2015 2:08 pm

To be more precise on my goal :

I have a huge directory with thousands of rtf files (that i will convert to docx format if i use OnlyOffice).

I want to open a file of this directory (no upload by the user, just an url to open directly the specified document) with OnlyOffice Document Editor, make some modifications on the file and then save it at the same place in the huge directory.

The two first steps seems to be possible, the last one not if i use the defaut system of OnlyOffice unless if i use the callback url to copy the final file to the right place after the last edition.
moua
 
Posts: 7
Joined: Mon Jun 22, 2015 9:35 am

Re: Callback Url

Postby moua » Wed Jun 24, 2015 9:13 am

Another question which could help me :
Is the an url to download the modified document for the server ?

I didn't saw anything about that on the api documentation.

Thank you for your help.
moua
 
Posts: 7
Joined: Mon Jun 22, 2015 9:35 am

Re: Callback Url

Postby Dean » Wed Jun 24, 2015 12:25 pm

All the POST request will be sent to the URL"http://178.32.249.86:81/onlyoffice_php/webeditor-ajax.php?.."

The location of storage for the modified file now is also specified in the callbackUrl "type=track&userAddress=95.79.59.202&fileName=demo+%281%29.docx"

It is specified on your server side.
Dean
 
Posts: 700
Joined: Tue Sep 30, 2014 11:04 am

Re: Callback Url

Postby moua » Wed Jun 24, 2015 1:38 pm

In theory, what you said is what i have understood when i read the code of the PHP example.

But "webeditor-ajax.php" don't create any log file even if i use the log function at the top of the document, before any test of $_GET or $_POST.
This means to me that the script is never called.

And when i go to the directory "<directory of the scripts>/app_data/<ip adresse of the user>/demo.docx", the file is there, that's right, but only the original file.
And if i re-open the document in the editor ("http://178.32.249.86:81/onlyoffice_php/doceditor.php?fileID=demo.docx"), i see all the changes i made...
That is really strange.

I think it comes from the problem of "webeditor-ajax.php" which is not called but i'm not sure and i don't know how to resolve the problem for the moment.

If you have any idea...

Thank you for your time.
moua
 
Posts: 7
Joined: Mon Jun 22, 2015 9:35 am

Re: Callback Url

Postby moua » Wed Jun 24, 2015 2:06 pm

I was wrong, everything seems to work just as the documentation said except one thing : the callback receive his parameters by the "GET" method, not "POST".

Seeing that in the documentation, i changed every $_GET by $_POST...
But the online documentation is false and the php example is right by default.

Just tow last questions :
- how do you "reset" a file ?
I saw there is some cache / work file on the document server and some data in the mysql database.
Should i delete this to do the thing ? Or is there a command / url to call ?

- Is it possible to add a personnal menu to the toolbar of the editor ? Either by configuration or by modifying the code ? Or simply not possible ?

Thank you
moua
 
Posts: 7
Joined: Mon Jun 22, 2015 9:35 am

Next

Return to API

Who is online

Users browsing this forum: No registered users and 4 guests

cron