|
@@ -112,6 +112,7 @@ public class ParseEmailController{
|
|
|
public void downloadEmailFile(@RequestBody FileIdVO fileId,HttpServletResponse response, HttpServletRequest request){
|
|
|
EmailFileInfoVO emailFileInfoVO = parseEmailService.getEmailFileById(fileId.getFileId());
|
|
|
try {
|
|
|
+ response.setContentType("application/octet-stream");
|
|
|
response.addHeader("Content-Disposition", "attachment;filename=" + EncodeUtil.encodeUTF8(emailFileInfoVO.getFileName()));
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
FileUtils.copyFile(new File(emailFileInfoVO.getFilePath()),outputStream);
|
|
@@ -124,8 +125,8 @@ public class ParseEmailController{
|
|
|
FileUtils.copyFile(new File(emailFileInfoVO.getFilePath()),outputStream);
|
|
|
outputStream.flush();
|
|
|
outputStream.close();
|
|
|
- }catch (Exception e1){
|
|
|
- logger.error(e1.getMessage(),e1);
|
|
|
+ }catch (Exception exception){
|
|
|
+ logger.error(exception.getMessage(),exception);
|
|
|
}
|
|
|
}
|
|
|
}
|