manage: downloadFile 添加文件名

dev_2.1.0
xueqingkun 1 year ago
parent ad0883de4e
commit 1c3b3681dd

@ -81,6 +81,9 @@ public class FileManageServiceImpl implements FileManageService {
if (StrUtil.isNotEmpty(fileResource.getFileType())){
response.setContentType(fileResource.getFileType());
}
if (Objects.nonNull(fileResource.getFileName())){
response.setHeader("Content-Disposition", "attachment;filename=" + fileResource.getFileName());
}
byte[] bytes = new byte[1024];
int len;

Loading…
Cancel
Save