fix(文档预览): 修改预览报错问题
This commit is contained in:
parent
c0f1364ad8
commit
a3fb0dd528
@ -152,12 +152,15 @@ public class FiletransferController {
|
||||
filetransferService.previewPictureFile(httpServletResponse, previewDTO);
|
||||
return ;
|
||||
}
|
||||
|
||||
Cookie[] cookieArr = httpServletRequest.getCookies();
|
||||
String token = "";
|
||||
for (Cookie cookie : cookieArr) {
|
||||
if ("token".equals(cookie.getName())) {
|
||||
token = cookie.getValue();
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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