This commit is contained in:
@@ -186,13 +186,6 @@ public class FileEntityService {
|
||||
fileEntityRepository.save(fileEntity);
|
||||
}
|
||||
|
||||
public void deleteFromStorageDisk(FileEntity fileEntity) {
|
||||
cloudStorageService.deleteFileFromStorage(fileEntity.getFilePath());
|
||||
cloudStorageService.deleteFileFromStorage(fileEntity.getProtectedFilePath());
|
||||
|
||||
fileEntityRepository.delete(fileEntity);
|
||||
}
|
||||
|
||||
public void deleteFromDisk(String deleteFilePath) throws IOException {
|
||||
Files.deleteIfExists(Paths.get(deleteFilePath));
|
||||
}
|
||||
@@ -238,7 +231,7 @@ public class FileEntityService {
|
||||
List<FileEntity> fileByUserIdAndStatus = fileEntityRepository.findFileByUserIdAndStatus(userId, FileStatus.TEMP);
|
||||
|
||||
for (FileEntity fileEntity : fileByUserIdAndStatus) {
|
||||
deleteFromStorageDisk(fileEntity);
|
||||
cloudStorageService.deleteFromStorageDisk(fileEntity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user