|
|
@ -189,7 +189,7 @@ public class WpsService implements IWpsService { |
|
|
|
WpsFile wpsFile = saveWpsFile(token, fileId, file,WebConstant.Wps.USER_OPERATION_NEW); |
|
|
|
String fileName = UploadFileUtil_Servlet3.getFileNameByPart(file); |
|
|
|
String ext = FileUtil.extName(fileName); |
|
|
|
String url = getUrl(fileId, ext, token); |
|
|
|
String url = getUrl(String.valueOf(wpsFile.getId()), ext, token); |
|
|
|
WpsVo.FileNew fileNew = new WpsVo.FileNew(); |
|
|
|
fileNew.setRedirect_url(url); |
|
|
|
fileNew.setUser_id(String.valueOf(wpsFile.getCreator())); |
|
|
@ -207,10 +207,9 @@ public class WpsService implements IWpsService { |
|
|
|
String fileType = WebConstant.Wps.getFileType(ext); |
|
|
|
Map<String, String> paramMap= new HashMap<>(); |
|
|
|
paramMap.put("_w_appid", WebConstant.Wps.APPID); |
|
|
|
// paramMap.put("_w_fname", fileName);
|
|
|
|
// paramMap.put("_w_userid", String.valueOf(wpsFile.getCreator()));
|
|
|
|
paramMap.put("_w_token", token); |
|
|
|
String newSignature = WpsSignature.getSignature(paramMap, WebConstant.Wps.APPKEY); |
|
|
|
String fileUrl = "http://wwo.wps.cn/office/{}/{}?_w_appid=" + WebConstant.Wps.APPID + "&_w_signature={}&token={}"; |
|
|
|
String fileUrl = "http://wwo.wps.cn/office/{}/{}?_w_appid=" + WebConstant.Wps.APPID + "&_w_signature={}&_w_token={}"; |
|
|
|
return StrUtil.format(fileUrl, fileType, fileId, newSignature, token); |
|
|
|
} |
|
|
|
|
|
|
|