From a5f15630d090382a15227a5fe8cb2328d1d0d95a Mon Sep 17 00:00:00 2001 From: Joel Balcaen Date: Wed, 3 Apr 2024 14:58:01 -0300 Subject: [PATCH] Revert "create file it none exists" This reverts commit 80011814a2f53be50c18bc06721ab0278824e569. --- .../levio/awsdemo/formrequestprocessor/service/S3Service.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lambdas/FormProcessor/FormRequestProcessorFunction/src/main/java/com/levio/awsdemo/formrequestprocessor/service/S3Service.java b/lambdas/FormProcessor/FormRequestProcessorFunction/src/main/java/com/levio/awsdemo/formrequestprocessor/service/S3Service.java index 58e602e..d25b8b3 100644 --- a/lambdas/FormProcessor/FormRequestProcessorFunction/src/main/java/com/levio/awsdemo/formrequestprocessor/service/S3Service.java +++ b/lambdas/FormProcessor/FormRequestProcessorFunction/src/main/java/com/levio/awsdemo/formrequestprocessor/service/S3Service.java @@ -28,10 +28,6 @@ public File getObjectAsFile(String key) { try { ResponseBytes objectBytes = getObjectResponseBytes(key); final var file = new File("/tmp/"+key); - if (file.exists()) { - file.delete(); - } - file.createNewFile(); OutputStream os = new FileOutputStream(file); os.write(objectBytes.asByteArray()); os.close();