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

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

View File

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