diff --git a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java index 23bdc5cbf..0748122e9 100644 --- a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java @@ -572,13 +572,13 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo try { String downloadFilename = clientMoniker + "_audit_materials_" + DateFormatUtils.format(new Date(), "dd/MM/yyyy HH:mm:ss").toString() + ".zip"; response.setContentType("application/octet-stream"); - response.setHeader("Content-Disposition", "attachment;filename=" + downloadFilename); + response.setHeader("Content-Disposition", "attachment;filename="+downloadFilename); ZipOutputStream zos = new ZipOutputStream(response.getOutputStream()); for (int i = 1; i <= 6; i++) { if (riskMaterial.containsKey("file" + i)) { List fileList = (List) riskMaterial.get("file" + i); for (String fileUrl : fileList) { - zos.putNextEntry(new ZipEntry("file" + i + fileUrl.substring(fileUrl.lastIndexOf("/")))); + zos.putNextEntry(new ZipEntry("file" + i +"/"+System.currentTimeMillis()+"_"+fileUrl.substring(fileUrl.lastIndexOf("/")+1))); InputStream inputStream = new URL(fileUrl).openConnection().getInputStream(); byte[] buffer = new byte[1024]; int result = 0;