updated code for document
This commit is contained in:
@@ -109,7 +109,8 @@ public class DocumentDao {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void deleteFile(Long documentId) {
|
public void deleteFile(Long documentId) {
|
||||||
DocumentEntity documentEntity = validateDocument(documentId);
|
DocumentEntity documentEntity = documentRepository.findById(documentId).orElseThrow(() -> new ResourceNotFoundException(Status.NOT_FOUND,
|
||||||
|
Translator.toLocale(GepafinConstant.DOCUMENT_NOT_FOUND)));
|
||||||
// String fileName= Utils.extractFileName(documentEntity.getFilePath());
|
// String fileName= Utils.extractFileName(documentEntity.getFilePath());
|
||||||
// deleteFileOnAmazonS3(fileName);
|
// deleteFileOnAmazonS3(fileName);
|
||||||
documentEntity.setIsDeleted(true);
|
documentEntity.setIsDeleted(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user