fixed s3 call document download issue

This commit is contained in:
piyushkag
2024-10-29 21:31:35 +05:30
parent 8f55a96825
commit 51f1e97dd5
5 changed files with 19 additions and 17 deletions

View File

@@ -7,7 +7,6 @@ import net.gepafin.tendermanagement.enums.DocumentSourceTypeEnum;
import net.gepafin.tendermanagement.repositories.ApplicationRepository;
import net.gepafin.tendermanagement.web.rest.api.errors.CustomValidationException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
@@ -49,8 +48,8 @@ public class DocumentDao {
@Autowired
private ApplicationRepository applicationFormRepository;
@Value("${aws.s3.url.folder}")
private String s3Folder;
// @Value("${aws.s3.url.folder}")
// private String s3Folder;
public List<DocumentResponseBean> uploadFiles(List<MultipartFile> files, Long sourceId, DocumentSourceTypeEnum sourceType, DocumentTypeEnum fileType) {
List<DocumentEntity> documentEntities = new ArrayList<>();
@@ -141,7 +140,7 @@ public class DocumentDao {
try {
Long callId;
Long applicationId;
if(type.equals("APPLICATION")){
if(type.equals(DocumentSourceTypeEnum.APPLICATION)){
callId = applicationFormRepository.findCallIdById(id);
applicationId = id;
}else{