Skip to content

Commit

Permalink
Fix: MultipartFile Fix (#36)
Browse files Browse the repository at this point in the history
* Fix: MultipartFile Fix
  • Loading branch information
taking authored Oct 15, 2023
1 parent 87f9914 commit e19a7a5
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions nw/src/main/java/lab/cherry/nw/controller/QsheetController.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,6 @@ public ResponseEntity<?> findAllQsheets(
@Operation(summary = "Qsheet 생성", description = "Qsheet를 추가합니다.")
public ResponseEntity<?> createQsheet(@RequestPart QsheetEntity.QsheetCreateDto qsheetCreateDto, @RequestPart(required = false) List<MultipartFile> files) {
log.info("[QsheetController] createQsheet...!");
log.error ("files : {}", files);
for(MultipartFile file:files){
if(file.isEmpty()){
files = null;
break;
}
}

qsheetService.createQsheet(qsheetCreateDto, files);

Expand All @@ -139,14 +132,7 @@ public ResponseEntity<?> createQsheet(@RequestPart QsheetEntity.QsheetCreateDto
public ResponseEntity<?> updateById(
@PathVariable("id") String id,
@RequestPart QsheetEntity.QsheetUpdateDto qsheetUpdateDto, @RequestPart(required = false) List<MultipartFile> files) {

log.info("[QsheetController] updateQsheet...!");
for(MultipartFile file:files){
if(file.isEmpty()){
files = null;
break;
}
}

qsheetService.updateById(id, qsheetUpdateDto, files);

// final ResultResponse response = ResultResponse.of(SuccessCode.OK);
Expand Down

0 comments on commit e19a7a5

Please sign in to comment.