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

OZG-3452 impl PR comments

parent 483a03ce
No related branches found
No related tags found
No related merge requests found
...@@ -29,6 +29,7 @@ import java.util.ArrayList; ...@@ -29,6 +29,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.Optional;
import java.util.UUID;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -65,6 +66,7 @@ class FormSolutionsAttachmentsMapper { ...@@ -65,6 +66,7 @@ class FormSolutionsAttachmentsMapper {
private IncomingFile buildZipFile(String content) { private IncomingFile buildZipFile(String content) {
return IncomingFile.builder() return IncomingFile.builder()
.id(UUID.randomUUID().toString())
.contentStream(decodeFile(content)) .contentStream(decodeFile(content))
.contentType(ZIP_CONTENT_TYPE) .contentType(ZIP_CONTENT_TYPE)
.name(FILE_NAME_ZIP_ATTACHMENT) .name(FILE_NAME_ZIP_ATTACHMENT)
......
...@@ -33,6 +33,7 @@ import java.util.ArrayList; ...@@ -33,6 +33,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.Optional;
import java.util.UUID;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
...@@ -68,6 +69,7 @@ class FormSolutionsRepresentationsMapper { ...@@ -68,6 +69,7 @@ class FormSolutionsRepresentationsMapper {
private IncomingFile buildJsonFile(String jsonData) { private IncomingFile buildJsonFile(String jsonData) {
var size = getSize(new ByteArrayInputStream(jsonData.getBytes())); var size = getSize(new ByteArrayInputStream(jsonData.getBytes()));
return IncomingFile.builder() return IncomingFile.builder()
.id(UUID.randomUUID().toString())
.contentStream(new ByteArrayInputStream(jsonData.getBytes())) .contentStream(new ByteArrayInputStream(jsonData.getBytes()))
.contentType(JSON_CONTENT_TYPE) .contentType(JSON_CONTENT_TYPE)
.name(FILE_NAME_JSON_REP) .name(FILE_NAME_JSON_REP)
...@@ -78,6 +80,7 @@ class FormSolutionsRepresentationsMapper { ...@@ -78,6 +80,7 @@ class FormSolutionsRepresentationsMapper {
private IncomingFile buildPdfFile(String data) { private IncomingFile buildPdfFile(String data) {
var size = getSize(FormSolutionsFileMapperUtils.decodeFile(data)); var size = getSize(FormSolutionsFileMapperUtils.decodeFile(data));
return IncomingFile.builder() return IncomingFile.builder()
.id(UUID.randomUUID().toString())
.contentStream(FormSolutionsFileMapperUtils.decodeFile(data)) .contentStream(FormSolutionsFileMapperUtils.decodeFile(data))
.contentType(PDF_CONTENT_TYPE) .contentType(PDF_CONTENT_TYPE)
.name(FILE_NAME_PDF_REP) .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