fix(文件下载): 文件下载报错问题修复

This commit is contained in:
MAC 2022-01-04 21:04:17 +08:00
parent a3fb0dd528
commit 258a5d1c50

View File

@ -111,9 +111,11 @@ public class FiletransferController {
public void downloadFile(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, DownloadFileDTO downloadFileDTO) {
Cookie[] cookieArr = httpServletRequest.getCookies();
String token = "";
for (Cookie cookie : cookieArr) {
if ("token".equals(cookie.getName())) {
token = cookie.getValue();
if (cookieArr != null) {
for (Cookie cookie : cookieArr) {
if ("token".equals(cookie.getName())) {
token = cookie.getValue();
}
}
}
boolean authResult = fileDealComp.checkAuthDownloadAndPreview(downloadFileDTO.getShareBatchNum(),