Skip to content
Snippets Groups Projects
Commit fce55249 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-3452 impl PR comments

parent 483a03ce
Branches
Tags
No related merge requests found
......@@ -29,6 +29,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;
......@@ -65,6 +66,7 @@ class FormSolutionsAttachmentsMapper {
private IncomingFile buildZipFile(String content) {
return IncomingFile.builder()
.id(UUID.randomUUID().toString())
.contentStream(decodeFile(content))
.contentType(ZIP_CONTENT_TYPE)
.name(FILE_NAME_ZIP_ATTACHMENT)
......
......@@ -33,6 +33,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.MediaType;
......@@ -68,6 +69,7 @@ class FormSolutionsRepresentationsMapper {
private IncomingFile buildJsonFile(String jsonData) {
var size = getSize(new ByteArrayInputStream(jsonData.getBytes()));
return IncomingFile.builder()
.id(UUID.randomUUID().toString())
.contentStream(new ByteArrayInputStream(jsonData.getBytes()))
.contentType(JSON_CONTENT_TYPE)
.name(FILE_NAME_JSON_REP)
......@@ -78,6 +80,7 @@ class FormSolutionsRepresentationsMapper {
private IncomingFile buildPdfFile(String data) {
var size = getSize(FormSolutionsFileMapperUtils.decodeFile(data));
return IncomingFile.builder()
.id(UUID.randomUUID().toString())
.contentStream(FormSolutionsFileMapperUtils.decodeFile(data))
.contentType(PDF_CONTENT_TYPE)
.name(FILE_NAME_PDF_REP)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment