diff --git a/nachrichten-manager-server/src/main/java/de/ozgcloud/nachrichten/file/AttachmentFileService.java b/nachrichten-manager-server/src/main/java/de/ozgcloud/nachrichten/file/AttachmentFileService.java index 2e2b1ccef2727daaa8ce8edeb577412a26281016..6fc1895762c6ad4c3305bed30e3cb9d84853b217 100644 --- a/nachrichten-manager-server/src/main/java/de/ozgcloud/nachrichten/file/AttachmentFileService.java +++ b/nachrichten-manager-server/src/main/java/de/ozgcloud/nachrichten/file/AttachmentFileService.java @@ -90,7 +90,7 @@ public class AttachmentFileService { } } - void writeFileContent(String fileId,OutputStream outputStream) { + void writeFileContent(String fileId, OutputStream outputStream) { taskExecutor.execute(() -> { ozgCloudFileService.writeFileDataToStream(fileIdMapper.toFileId(fileId), outputStream); IOUtils.closeQuietly(outputStream, e -> LOG.warn("Cannot close output stream", e)); @@ -99,8 +99,8 @@ public class AttachmentFileService { public String uploadAttachmentFile(AttachmentFile attachmentFile, String fileContent) { var decodedContent = Base64.getDecoder().decode(fileContent); - var ozgCloudFileId = ozgCloudFileService.uploadFile(attachmentFileMapper.toOzgCloudUploadFile( - addContentTypeIfMissing(attachmentFile, decodedContent)), + var ozgCloudFileId = ozgCloudFileService.uploadFile( + attachmentFileMapper.toOzgCloudUploadFile(addContentTypeIfMissing(attachmentFile, decodedContent)), toInputStream(decodedContent)); return ozgCloudFileId.toString(); }