From abdebae6d193b8a7d44b5444947af8b954bb7271 Mon Sep 17 00:00:00 2001 From: Arne Chrestin Date: Tue, 7 Feb 2023 17:39:24 +0100 Subject: Correct calculation of zip archive size for schemaset upload Correct calculation of zip archive size for schemaset upload Issue-ID: CPS-1477 Change-Id: I73f97f986a817d423f93a8d922dcd9647b0203ab Signed-off-by: Arne Chrestin --- cps-rest/src/main/java/org/onap/cps/rest/utils/MultipartFileUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cps-rest') diff --git a/cps-rest/src/main/java/org/onap/cps/rest/utils/MultipartFileUtil.java b/cps-rest/src/main/java/org/onap/cps/rest/utils/MultipartFileUtil.java index d5c2b092b0..534077caa6 100644 --- a/cps-rest/src/main/java/org/onap/cps/rest/utils/MultipartFileUtil.java +++ b/cps-rest/src/main/java/org/onap/cps/rest/utils/MultipartFileUtil.java @@ -136,7 +136,7 @@ public class MultipartFileUtil { while ((numberOfBytesRead = zipInputStream.read(buffer, 0, READ_BUFFER_SIZE)) > 0) { byteArrayOutputStream.write(buffer, 0, numberOfBytesRead); totalSizeEntry += numberOfBytesRead; - zipFileSizeValidator.updateTotalSizeArchive(totalSizeEntry); + zipFileSizeValidator.updateTotalSizeArchive(numberOfBytesRead); zipFileSizeValidator.validateCompresssionRatio(totalSizeEntry); } return byteArrayOutputStream.toString(StandardCharsets.UTF_8); -- cgit 1.2.3-korg