From f87a6f51a64ec5c51c392fb757be9e1abb1518ba Mon Sep 17 00:00:00 2001 From: test1 Date: Tue, 12 Nov 2024 22:09:18 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=ED=9A=8C=EC=82=AC=EC=9D=B4=EB=AF=B8?= =?UTF-8?q?=EC=A7=80=EA=B0=80=20=EB=8D=B0=EC=9D=B4=ED=84=B0=EC=97=90=20?= =?UTF-8?q?=EC=97=86=EB=8A=94=20=EA=B2=BD=EC=9A=B0=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../userInformation/controller/UserInformationController.java | 2 +- .../userInformation/service/UserInformationService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/team18/team18_be/userInformation/controller/UserInformationController.java b/src/main/java/team18/team18_be/userInformation/controller/UserInformationController.java index 37de4da..3b9870c 100644 --- a/src/main/java/team18/team18_be/userInformation/controller/UserInformationController.java +++ b/src/main/java/team18/team18_be/userInformation/controller/UserInformationController.java @@ -57,7 +57,7 @@ public ResponseEntity findSign(@LoginUser User user) { @PostMapping(value = "/company", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) public ResponseEntity createCompany( @RequestPart("companyRequest") String companyRequestJson, - @RequestPart MultipartFile logoImage, @LoginUser User user) { + @RequestPart(required = false) MultipartFile logoImage, @LoginUser User user) { ObjectMapper objectMapper = new ObjectMapper(); CompanyRequest companyRequest = null; try { diff --git a/src/main/java/team18/team18_be/userInformation/service/UserInformationService.java b/src/main/java/team18/team18_be/userInformation/service/UserInformationService.java index 9ffd249..f88a9ac 100644 --- a/src/main/java/team18/team18_be/userInformation/service/UserInformationService.java +++ b/src/main/java/team18/team18_be/userInformation/service/UserInformationService.java @@ -53,7 +53,7 @@ public Long createCompany(CompanyRequest companyRequest, MultipartFile logoImage byte[] imageFile = null; String storedFileName = null; - if (logoImage.isEmpty() || logoImage.getOriginalFilename().equals("")) { + if (logoImage == null) { storedFileName = defaultLogoUrl; } else { imageFile = fileUtil.safelyGetBytes(logoImage)