Try the fastest and simplest way to install ONLYOFFICE

Backup of file created with API

Integration questions/issues

Backup of file created with API

Postby fred80 » Wed Dec 21, 2016 6:24 pm

Hi

We use onlyoffice free edition and we have migrated to EE.
I have backuped data of the free edition to import these in the EE (copy of "/opt/onlyoffice/Data/Products/Files/00/00/01/folder_1000/file[*]...)
I have backup the Database Too.

All is ok for the document created with a user.

But the document created by the API are empty in the new Onlyoffice .

I show that in the onlyoffice FreeEditionn, if i open a file directly with Word for example . opening a file directly " /opt/onlyoffice/data/Products/Files/00/00/01/folder_1000/file_465/v1/content.docx" the file is empty.

It explain why the files are empty too in the EE edition.
I think maybe that the file created by the API are not really in these folders ?

The community version of EE is "Version 8.9.2.14 " / documentserver-ee:4.1.8.1
On the free edition we have "Version 8.7.264 " /

Thx
ps : sorry for bad english ...
fred80
 
Posts: 9
Joined: Thu Nov 17, 2016 8:58 am

Re: Backup of file created with API

Postby Maxim » Thu Dec 22, 2016 10:53 am

Hello!
PLease specify what exactly method do you use to create file with API? Here you can see how to do that. And when you create a file with API do you send content to file?
Maxim
 
Posts: 777
Joined: Tue Oct 11, 2016 2:34 pm

Re: Backup of file created with API

Postby fred80 » Thu Dec 22, 2016 2:01 pm

Hi

Our developper is in vacation. I can't reply you exactly for the moment.

But for information, are the files created by the API stored exactly like another document created by a user who has login in in the community server ?

Thx
fred80
 
Posts: 9
Joined: Thu Nov 17, 2016 8:58 am

Re: Backup of file created with API

Postby Maxim » Wed Dec 28, 2016 9:12 am

Hello!
When the file is created with API it has the URL where to save the file (see here). When a user creates file in Community, for example, there is a path for saving the file which is known and located on server.
Maxim
 
Posts: 777
Joined: Tue Oct 11, 2016 2:34 pm

Re: Backup of file created with API

Postby aboudin » Mon Jan 16, 2017 11:45 am

Hi,
we want to create automated Sharing Files cause the SSO is actually unavailable .
So i use an account created specifically for the management of this files via the API.
The methods used are in order :
'POST', 'authentication'
'POST', 'files/folder/'.$folderid // if necessary
'POST', 'files/'.$folderid.'/file'
'PUT', 'files/'.$fileId.'/sharedlink'

On our onlyoffice free edition server, the file is empty when we copy it and open it via another application like libreoffice. There is no zip file version like other file created directly in onlyoffice by users. Whereas when we open it via the "file shared link", the document presents some datas.
So where could be datas?

Thks
aboudin
 
Posts: 7
Joined: Wed Oct 05, 2016 2:06 pm

Re: Backup of file created with API

Postby Maxim » Tue Jan 17, 2017 9:33 am

Hello aboudin!
So, we tried to reproduce your issue using these methods and have no problem with it. The file is not empty. It's ok. Please show us what you did step by step. What file you get....size, file extension....any additional information.
Maybe you can reproduce your issue here, we would like to see.
Maxim
 
Posts: 777
Joined: Tue Oct 11, 2016 2:34 pm

Re: Backup of file created with API

Postby aboudin » Tue Jan 17, 2017 11:26 am

Hi,
I have pointed on your server to create file with user create for test, my script create the file :
https://personal.onlyoffice.com/product ... id=1544277
if you look into your file directory, could you say me if there is the following lines?

"I write some lines...
Here is the line 2 and it is 12:17..."

In attachment, an example of file that we collect on our side. There is no "diff.zip" file with it...

Thx
Attachments
content.docx.tar.gz
File that we collect
(6.74 KiB) Downloaded 19 times
aboudin
 
Posts: 7
Joined: Wed Oct 05, 2016 2:06 pm

Re: Backup of file created with API

Postby Maxim » Tue Jan 17, 2017 1:30 pm

1 I don't have enough permission to access the file.....
2 The file you uploaded is OK, I still can't quite see what is wrong with it
3 diff.zip? what is it?
Maxim
 
Posts: 777
Joined: Tue Oct 11, 2016 2:34 pm


Return to API

Who is online

Users browsing this forum: Bing [Bot] and 1 guest