Fixed s3 document issue

This commit is contained in:
rajesh
2024-10-23 00:14:01 +05:30
parent d02283519b
commit 19a54b6f75
9 changed files with 66 additions and 91 deletions

View File

@@ -127,8 +127,9 @@ public class CallDao {
ZipOutputStream zos = new ZipOutputStream(zipOutputStream)) {
for (DocumentEntity document : documents) {
try (InputStream fileInputStream = amazonS3Service.getFile(s3Folder, document.getFileName())) {
ZipEntry zipEntry = new ZipEntry(document.getFileName());
try (InputStream fileInputStream = amazonS3Service.getFile(s3Folder, document.getFilePath())) {
String fileName = Utils.extractFileName(document.getFilePath());
ZipEntry zipEntry = new ZipEntry(fileName);
zos.putNextEntry(zipEntry);
IOUtils.copy(fileInputStream, zos);
zos.closeEntry();