diff --git a/src/main/java/com/databasepreservation/common/transformers/ToolkitStructure2ViewerStructure.java b/src/main/java/com/databasepreservation/common/transformers/ToolkitStructure2ViewerStructure.java index d15a9ede..a7f37b93 100644 --- a/src/main/java/com/databasepreservation/common/transformers/ToolkitStructure2ViewerStructure.java +++ b/src/main/java/com/databasepreservation/common/transformers/ToolkitStructure2ViewerStructure.java @@ -9,7 +9,6 @@ import com.databasepreservation.common.client.models.structure.ViewerLobStoreType; import java.io.ByteArrayInputStream; -import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; @@ -912,7 +911,11 @@ private static void detectMimeType(ViewerRow row, ViewerCell cell, String databa if (StringUtils.isAllBlank(fileExtension)) { try { if (blobIsInsideSiard) { - inputStream = zipFile.getInputStream(entry); + if (entry != null) { + inputStream = zipFile.getInputStream(entry); + } else { + inputStream = new ByteArrayInputStream(lobCellValue.getBytes()); + } } else { final Path lobPath = Paths.get(lobCellValue); final Path completeLobPath = ViewerFactory.getViewerConfiguration().getSIARDFilesPath().resolve(lobPath);