mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
java-raw: inner
This commit is contained in:
committed by
Sergey Linnik
parent
f6e04d5ab9
commit
c4de5afd4b
@ -137,10 +137,24 @@ public final class TrackManager {
|
|||||||
return body;
|
return body;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static JSONObject resolveProcessSaveBody(final JSONObject body) {
|
||||||
|
JSONObject copied = body;
|
||||||
|
|
||||||
|
String url = (String) copied.get("url");
|
||||||
|
copied.put("url", url.replace("localhost", "proxy"));
|
||||||
|
|
||||||
|
String changesURL = (String) copied.get("changesurl");
|
||||||
|
copied.put("changesurl", changesURL.replace("localhost", "proxy"));
|
||||||
|
|
||||||
|
return copied;
|
||||||
|
}
|
||||||
|
|
||||||
// file saving process
|
// file saving process
|
||||||
public static void processSave(final JSONObject body,
|
public static void processSave(final JSONObject rawBody,
|
||||||
final String fileName,
|
final String fileName,
|
||||||
final String userAddress) throws Exception {
|
final String userAddress) throws Exception {
|
||||||
|
JSONObject body = TrackManager.resolveProcessSaveBody(rawBody);
|
||||||
|
|
||||||
if (body.get("url") == null) {
|
if (body.get("url") == null) {
|
||||||
throw new Exception("DownloadUrl is null");
|
throw new Exception("DownloadUrl is null");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user