Try the fastest and simplest way to install ONLYOFFICE

Get the local url

Any issues about docs (uploading, editing and etc.)

Get the local url

Postby bclauss » Mon Sep 18, 2017 3:34 pm

Hello,

I'm trying to have the file url that I passed in the config object, but in the json url. In fact, I don't want to hard code the save_file_url. Is there any way to modify or add something in the json object ?

Thanks !
bclauss
 
Posts: 15
Joined: Mon Sep 18, 2017 9:06 am

Re: Get the local url

Postby Maxim » Tue Sep 19, 2017 6:53 am

Hello bclauss!
What kind of difficulties arise when passing a link to a callback in json?
The link or part of it can be changed for different files, for example, in the query string you can specify the file identifier.
Maxim
 
Posts: 1179
Joined: Tue Oct 11, 2016 2:34 pm

Re: Get the local url

Postby bclauss » Tue Sep 19, 2017 7:34 am

Hey, thanks for the answer. I thing I should give more details about my problem.
I have a Tomcat server on which there are two java servlets, one will call the api and the other will be used as the callback url. The problem is that this second servlet doesn't know the location to save the file, so how can give this path_to_save to the callback function ?
You're talking about a query string, do you mean that I need to add something in the callback url of the config object ?
bclauss
 
Posts: 15
Joined: Mon Sep 18, 2017 9:06 am

Re: Get the local url

Postby Maxim » Thu Sep 21, 2017 8:00 am

Hello bclauss!
Document server send POST request for callback_url with url to save the file and when you get it you decide where to save the file, in your case you decide how you send this url to your java servlet.
Maxim
 
Posts: 1179
Joined: Tue Oct 11, 2016 2:34 pm


Return to Documents

Who is online

Users browsing this forum: No registered users and 2 guests