fix(文档预览): 修改预览报错问题
This commit is contained in:
parent
c0f1364ad8
commit
a3fb0dd528
@ -152,14 +152,17 @@ public class FiletransferController {
|
||||
filetransferService.previewPictureFile(httpServletResponse, previewDTO);
|
||||
return ;
|
||||
}
|
||||
|
||||
Cookie[] cookieArr = httpServletRequest.getCookies();
|
||||
String token = "";
|
||||
if (StringUtils.isNotEmpty(previewDTO.getToken())) {
|
||||
token = previewDTO.getToken();
|
||||
} else {
|
||||
Cookie[] cookieArr = httpServletRequest.getCookies();
|
||||
for (Cookie cookie : cookieArr) {
|
||||
if ("token".equals(cookie.getName())) {
|
||||
token = cookie.getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UserFile userFile = userFileService.getById(previewDTO.getUserFileId());
|
||||
boolean authResult = fileDealComp.checkAuthDownloadAndPreview(previewDTO.getShareBatchNum(),
|
||||
|
@ -14,4 +14,5 @@ public class PreviewDTO {
|
||||
private String isMin;
|
||||
private Integer platform;
|
||||
private String url;
|
||||
private String token;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user