게시판 첨부파일 수정
This commit is contained in:
parent
873463f538
commit
9deed49a02
@ -128,6 +128,8 @@ public class BoardController {
|
||||
@ParameterCheck
|
||||
@PostMapping("/{CMNBRDSEQ}/attachments")
|
||||
public ApiResponse<String> uploadAttachment(@ReqMap MapDto map) {
|
||||
//임시
|
||||
map.put("CMNFLEREG", 1);
|
||||
boardService.addAttachment(map);
|
||||
return ApiResponse.ok("첨부파일이 저장되었습니다.");
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import java.math.BigInteger;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -56,6 +57,8 @@ public class localbordService {
|
||||
}
|
||||
|
||||
public void addAttachment(MapDto map) {
|
||||
String newFilename = UUID.randomUUID().toString();
|
||||
map.put("CMNFLENAM", newFilename);
|
||||
boardMapper.addAttachment(map);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user