자료실 파일첨부 화면에 추가(기능X)
parent
026db9d758
commit
4fb99fdb08
|
|
@ -199,8 +199,8 @@ public class BoardRestController extends BaseController {
|
||||||
@RequestParam("boardContent") String content,
|
@RequestParam("boardContent") String content,
|
||||||
// Using @RequestParam(value = "parentPostId", required = false) for optionality.
|
// Using @RequestParam(value = "parentPostId", required = false) for optionality.
|
||||||
// If it comes as an empty string, it will be null.
|
// If it comes as an empty string, it will be null.
|
||||||
@RequestParam(value = "parentPostId", required = false) Long parentPostId, // This is good
|
@RequestParam(value = "parentPostId", required = false) Long parentPostId/*, // This is good
|
||||||
@RequestParam("files") List<MultipartFile> files
|
@RequestParam("files") List<MultipartFile> files*/
|
||||||
) {
|
) {
|
||||||
Post newPost = new Post();
|
Post newPost = new Post();
|
||||||
newPost.setBoardCategoryId(boardCategoryId);
|
newPost.setBoardCategoryId(boardCategoryId);
|
||||||
|
|
@ -242,7 +242,7 @@ public class BoardRestController extends BaseController {
|
||||||
Post createdPost = postService.createPost(newPost);
|
Post createdPost = postService.createPost(newPost);
|
||||||
|
|
||||||
// 게시글 등록 성공시 파일 서버 저장 및 테이블 insert 처리
|
// 게시글 등록 성공시 파일 서버 저장 및 테이블 insert 처리
|
||||||
Date nowDate = new Date();
|
/* Date nowDate = new Date();
|
||||||
String strNowYyyy = new SimpleDateFormat("yyyy").format(nowDate);
|
String strNowYyyy = new SimpleDateFormat("yyyy").format(nowDate);
|
||||||
String strNowMm = new SimpleDateFormat("MM").format(nowDate);
|
String strNowMm = new SimpleDateFormat("MM").format(nowDate);
|
||||||
String fileUploadPath = "uploads/files/" + strNowYyyy + "/" + strNowMm + "/";
|
String fileUploadPath = "uploads/files/" + strNowYyyy + "/" + strNowMm + "/";
|
||||||
|
|
@ -274,7 +274,7 @@ public class BoardRestController extends BaseController {
|
||||||
if (tbFileList.size()>0) {
|
if (tbFileList.size()>0) {
|
||||||
attachService.insertAttachList(tbFileList);
|
attachService.insertAttachList(tbFileList);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// 생성된 Post 객체 반환 (클라이언트에게 성공 여부 및 생성된 게시글 정보 전달)
|
// 생성된 Post 객체 반환 (클라이언트에게 성공 여부 및 생성된 게시글 정보 전달)
|
||||||
return createdPost;
|
return createdPost;
|
||||||
|
|
|
||||||
|
|
@ -269,9 +269,9 @@ function addPost(){
|
||||||
if (parentPostId !== null && parentPostId !== "" && parentPostId !== "null") {
|
if (parentPostId !== null && parentPostId !== "" && parentPostId !== "null") {
|
||||||
formData.append("parentPostId", parentPostId);
|
formData.append("parentPostId", parentPostId);
|
||||||
}
|
}
|
||||||
$.each(fileList, function (i, file) {
|
// $.each(fileList, function (i, file) {
|
||||||
formData.append("files", file);
|
// formData.append("files", file);
|
||||||
});
|
// });
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : "/sgis/portal/board/new.do",
|
url : "/sgis/portal/board/new.do",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue