Merge branch 'RED-9796-bp' into 'release/2.465.x'

RED-9796: Links should not be removed on upload

See merge request redactmanager/persistence-service!724
This commit is contained in:
Kilian Schüttler 2024-09-05 16:53:39 +02:00
commit c2781e7ff4
2 changed files with 12 additions and 1 deletions

View File

@ -7,7 +7,7 @@ plugins {
}
val redactionServiceVersion by rootProject.extra { "4.290.0" }
val pdftronRedactionServiceVersion by rootProject.extra { "4.78.3" }
val pdftronRedactionServiceVersion by rootProject.extra { "4.78.4" }
val redactionReportServiceVersion by rootProject.extra { "4.73.6" }
val searchServiceVersion by rootProject.extra { "2.90.0" }

View File

@ -137,6 +137,7 @@ public class DownloadPreparationService {
switch (downloadFileType) {
case REDACTED -> result.add(RedactionType.REDACTED);
case PREVIEW -> result.add(RedactionType.PREVIEW);
case OPTIMIZED_PREVIEW -> result.add(RedactionType.OPTIMIZED_PREVIEW);
case DELTA_PREVIEW -> result.add(RedactionType.DELTA);
default -> {
}
@ -265,6 +266,10 @@ public class DownloadPreparationService {
fileSystemBackedArchiver.addEntry(new FileSystemBackedArchiver.ArchiveModel("Preview", addSuffix(filename, "highlighted"), //
getPreview(file.getId(), redactionFileResult.get().getDetails())));
}
if (downloadFileType.name().equals(DownloadFileType.OPTIMIZED_PREVIEW.name())) {
fileSystemBackedArchiver.addEntry(new FileSystemBackedArchiver.ArchiveModel("Optimized Preview", addSuffix(filename, "optimized_highlighted"), //
getOptimizedPreview(file.getId(), redactionFileResult.get().getDetails())));
}
if (downloadFileType.name().equals(DownloadFileType.DELTA_PREVIEW.name())) {
fileSystemBackedArchiver.addEntry(new FileSystemBackedArchiver.ArchiveModel("Delta Preview", addSuffix(filename, "delta_highlighted"), //
getDeltaPreview(file.getId(), redactionFileResult.get().getDetails())));
@ -329,6 +334,12 @@ public class DownloadPreparationService {
}
private byte[] getOptimizedPreview(String fileId, List<RedactionResultDetail> redactionResultDetails) {
return getStoredFileBytes(fileId, redactionResultDetails, RedactionType.OPTIMIZED_PREVIEW);
}
private void addReports(String downloadId,
DownloadStatusEntity downloadStatus,
List<StoredFileInformation> storedFileInformations,