预览切换场景,调整传给wps的fileId,从fileValue调整groupValue
This commit is contained in:
parent
0702114385
commit
8ff5ce9295
@ -35,7 +35,7 @@ public class WPSOnlineReadOnlyASLP implements ASLP {
|
||||
WPS4Util.initAppInfo(YiliWpsConst.AK, YiliWpsConst.SK);
|
||||
|
||||
String url = String.format("/api/preview/v1/files/%s/link?type=%s&preview_mode=%s&_w_third_sid=%s&_w_third_palId=%s&_w_third_queryFileId=%s&_w_third_fname=%s&_w_third_appId=%s&_w_third_repositoryName=%s&_w_third_groupValue=%s&_w_third_fileValue=%s&_w_third_filePreview=%s"
|
||||
,sourceDc.getFileValue(),fileType,"ordinary",sid,sourceDc.getGroupValue(),sourceDc.getFileValue(), URLEncoder.encode(sourceDc.getFileName()),sourceDc.getAppId(),sourceDc.getRepositoryName(),sourceDc.getGroupValue(),sourceDc.getFileValue(),"filePreview");
|
||||
,sourceDc.getGroupValue(),fileType,"ordinary",sid,sourceDc.getGroupValue(),sourceDc.getFileValue(), URLEncoder.encode(sourceDc.getFileName()),sourceDc.getAppId(),sourceDc.getRepositoryName(),sourceDc.getGroupValue(),sourceDc.getFileValue(),"filePreview");
|
||||
System.out.println(">>>>>>>>预览的url = " + url);
|
||||
Map<String,String> headers = null;
|
||||
try {
|
||||
|
||||
@ -91,18 +91,21 @@ public class WpsWeb extends ActionWeb {
|
||||
e.printStackTrace();
|
||||
}
|
||||
DCContext sourceDc;
|
||||
if(UtilString.isEmpty(filePreview)){
|
||||
sourceDc = getFileDCContext(fileId);
|
||||
}else{
|
||||
sourceDc = getFileDCContext(palId,appId,repositoryName,groupValue,fileValue,sourceFileName);
|
||||
}
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
JSONObject file = new JSONObject();
|
||||
JSONObject user = new JSONObject();
|
||||
JSONObject user_acl = new JSONObject();
|
||||
JSONObject watermark = new JSONObject();
|
||||
try {
|
||||
if(UtilString.isEmpty(filePreview)){
|
||||
sourceDc = getFileDCContext(fileId);
|
||||
file.put("id", fileId.equals("")?"1":fileId);
|
||||
}else{
|
||||
sourceDc = getFileDCContext(palId,appId,repositoryName,groupValue,fileValue,sourceFileName);
|
||||
file.put("id", palId);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
file.put("name", sourceFileName);
|
||||
file.put("version", Integer.parseInt(SDK.getRuleAPI().executeAtScript("@sequence("+palId+")")));
|
||||
long fileSize = 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user