파일업로드 처리 : 중간백업

This commit is contained in:
KNKIM 2021-07-16 17:20:16 +09:00
parent 494314f93a
commit 6f890bc00d
13 changed files with 323 additions and 107 deletions

19
pom.xml
View File

@ -207,7 +207,24 @@
<artifactId>tiles-jsp</artifactId> <artifactId>tiles-jsp</artifactId>
<version>3.0.8</version> <version>3.0.8</version>
</dependency> </dependency>
<!-- AJAX JSON (DIGITALSHIP KNKIM 2021.07.15)-->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.11.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.11.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.11.4</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -1,15 +1,22 @@
package nlib.bbs.web; package nlib.bbs.web;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import egovframework.com.cmm.service.FileVO;
import nlib.bbs.service.BoardService; import nlib.bbs.service.BoardService;
@Controller @Controller

View File

@ -0,0 +1,17 @@
package nlib.cmm.exception;
public class ErrorMessage {
String code = null;
String message = null;
public ErrorMessage() {
super();
}
public ErrorMessage(String code, String message) {
this.code = code;
this.message = message;
}
}

View File

@ -2,87 +2,185 @@ package nlib.cmm.fileupload;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.multipart.MultipartHttpServletRequest;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import egovframework.com.cmm.EgovWebUtil; import egovframework.com.cmm.EgovWebUtil;
import egovframework.com.cmm.service.FileVO; import egovframework.com.cmm.service.FileVO;
import nlib.cmm.exception.ErrorMessage;
import nlib.cmm.service.NlibProperty;
import nlib.util.FileUtil;
import nlib.util.StringUtil;
import nlib.util.UUID; import nlib.util.UUID;
/**
* <pre>
* @Class Name : FileUploadController.java
*
* @Description : 파일 업로드를 처리하는 컨트롤러
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 15. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 7. 15.
* @version 1.0
*
*/
@Controller @Controller
public class FileUploadController { public class FileUploadController {
private final Logger log = LoggerFactory.getLogger(FileUploadController.class); private static final Logger log = LoggerFactory.getLogger(FileUploadController.class);
@RequestMapping("/fileupload/uploadFile.do") @Resource(name="nlibProperty")
public String uploadFile(final MultipartHttpServletRequest multiRequest NlibProperty nlibProperty;
, ModelMap model) throws Exception {
/**
* 첨부파일이 저장되는 최상위 위치
*/
@Value("#{properties['fileupload.base.path']}")
private String FILEUPLOAD_BASE_PATH;
/**
* 첨부파일 임시 저장 위치
*/
@Value("#{properties['fileupload.temp.subpath']}")
private String FILEUPLOAD_TEMP_SUBPATH;
@ResponseBody
@RequestMapping(value="/fileupload/uploadFilesAjax.do", produces="application/json")
public ResponseEntity uploadFilesAjax(
final MultipartHttpServletRequest multiRequest
, @RequestParam("subPathKey") String subPathKey
, HttpServletResponse response) {
final Map<String, MultipartFile> files = multiRequest.getFileMap(); // TODO : 권한 체크 추가할
if(!files.isEmpty()) {
List<FileVO> result = new ArrayList<FileVO>();
try {
// 최상위 위치
if(FileUtil.isNotValid(FILEUPLOAD_BASE_PATH)) throw new Exception("첨부파일이 저장되는 최상위 위치값이 적절하지 않습니다.");
Iterator<Entry<String, MultipartFile>> itr = files.entrySet().iterator(); // 서브 위치
MultipartFile file; if(StringUtil.isEmpty(subPathKey)) throw new Exception("첨부파일이 저장되는 위치정보값이 정확하지 않습니다.");
String filePath = ""; String subPath = nlibProperty.getProperty(subPathKey);
List<FileVO> result = new ArrayList<FileVO>(); if(FileUtil.isNotValid(subPath)) throw new Exception("첨부파일 서브 위치값이 적절하지 않습니다.");
FileVO fvo;
final Map<String, MultipartFile> files = multiRequest.getFileMap();
int fileKey = 1; log.debug("uploadFilesAjax : 진입 " + (files == null ? " files null " : files.size()));
while (itr.hasNext()) {
Entry<String, MultipartFile> entry = itr.next(); File dir = new File(FILEUPLOAD_BASE_PATH + subPath);
if(!dir.exists() || !dir.isDirectory()) dir.mkdirs();
file = entry.getValue();
String orginFileName = file.getOriginalFilename(); if(!files.isEmpty()) {
//--------------------------------------
// 파일명이 없는 경우 처리
// (첨부가 되지 않은 input file type)
//--------------------------------------
if ("".equals(orginFileName)) {
continue;
}
////------------------------------------
int index = orginFileName.lastIndexOf(".");
//String fileName = orginFileName.substring(0, index);
String fileExt = orginFileName.substring(index + 1);
//String newName = KeyStr + getTimeStamp() + fileKey;
String newName = UUID.getPhysicalFileName();
long size = file.getSize();
log.debug("FILE UPLOAD : File New Name=" + newName); Iterator<Entry<String, MultipartFile>> itr = files.entrySet().iterator();
MultipartFile file;
if (!"".equals(orginFileName)) { String filePath = "";
filePath = "c:/temp/data" + File.separator + newName; FileVO fvo;
file.transferTo(new File(EgovWebUtil.filePathBlackList(filePath)));
}
fvo = new FileVO(); int fileKey = 1;
fvo.setFileExtsn(fileExt); while (itr.hasNext()) {
//fvo.setFileStreCours(storePathString); Entry<String, MultipartFile> entry = itr.next();
fvo.setFileMg(Long.toString(size));
fvo.setOrignlFileNm(orginFileName);
fvo.setStreFileNm(newName);
//fvo.setAtchFileId(atchFileIdString);
fvo.setFileSn(String.valueOf(fileKey));
result.add(fvo); file = entry.getValue();
String orginFileName = file.getOriginalFilename();
fileKey++; //--------------------------------------
// 파일명이 없는 경우 처리
// (첨부가 되지 않은 input file type)
//--------------------------------------
if ("".equals(orginFileName)) {
continue;
}
////------------------------------------
int index = orginFileName.lastIndexOf(".");
//String fileName = orginFileName.substring(0, index);
String fileExt = orginFileName.substring(index + 1);
//String newName = KeyStr + getTimeStamp() + fileKey;
String newName = UUID.getPhysicalFileName();
long size = file.getSize();
log.debug("FILE UPLOAD : File New Name=" + newName);
if (!"".equals(orginFileName)) {
filePath = FILEUPLOAD_BASE_PATH + subPath + "/" + newName;
log.debug("FILE UPLOAD : filePath=" + filePath);
file.transferTo(new File(EgovWebUtil.filePathBlackList(filePath)));
}
fvo = new FileVO();
fvo.setFileExtsn(fileExt);
//fvo.setFileStreCours(storePathString);
fvo.setFileMg(Long.toString(size));
fvo.setOrignlFileNm(orginFileName);
fvo.setStreFileNm(newName);
//fvo.setAtchFileId(atchFileIdString);
fvo.setFileSn(String.valueOf(fileKey));
result.add(fvo);
fileKey++;
}
} }
} catch(Exception e) {
ErrorMessage errorMessage = new ErrorMessage("ERROR", "처리에 실패하였습니다 : " + e.toString());
e.printStackTrace();
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(errorMessage);
}
// Convert Json
ObjectMapper mapper = new ObjectMapper();
String json;
try {
json = mapper.writeValueAsString(result);
log.debug("RETURN DATA > json:" + json);
} catch (JsonProcessingException e) {
json = null;
e.printStackTrace();
} }
return null; HttpHeaders responseHeaders = new HttpHeaders();
//responseHeaders.set("Content-Type", "application/json; charset=UTF-8");
ResponseEntity ret = ResponseEntity.ok().headers(responseHeaders).body(json);
return ret;
} }
} }

View File

@ -52,6 +52,7 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/js/**") .antMatchers("/js/**")
.antMatchers("/temp/**") .antMatchers("/temp/**")
.antMatchers("/favicon/**") .antMatchers("/favicon/**")
.antMatchers("/*/*Ajax.do")
; ;
} }

View File

@ -0,0 +1,53 @@
package nlib.util;
import egovframework.com.utl.fcc.service.EgovStringUtil;
/**
* <pre>
* @Class Name : FileUtil.java
*
* @Description : 파일 처리관련 유틸리티 기능 모음 클래스
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 16. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 7. 16.
* @version 1.0
*
*/
public class FileUtil extends EgovStringUtil {
/**
* 경로나 파일명으로 적합한지를 판단한다.
*
* @param path
* @return 적합한 경우, true
*/
public static boolean isValid(String pathOrFilename) {
if(pathOrFilename == null || pathOrFilename.trim().length() == 0) return false;
if(pathOrFilename.contains("..")) return false;
return true;
}
/**
* 경로나 파일명으로 적합한지를 판단한다.
*
* @param path
* @return 부적합한 경우, true
*/
public static boolean isNotValid(String pathOrFilename) {
return !isValid(pathOrFilename);
}
}

View File

@ -33,3 +33,16 @@ dataapi.temp.xml.path = C:/iams/workspace/nlib/data/dataxml
# Aria \uc54c\uace0\ub9ac\uc998 # Aria \uc54c\uace0\ub9ac\uc998
crypto.aria.defaultKey = TheFederationOfKoreaCultureCenter027042322 crypto.aria.defaultKey = TheFederationOfKoreaCultureCenter027042322
#----------------------------------------
# \ucca8\ubd80\ud30c\uc77c \uacbd\ub85c \uc815\ubcf4
#----------------------------------------
# \ucca8\ubd80\ud30c\uc77c \ucd5c\uc0c1\uc704 \uc704\uce58
fileupload.base.path = C:/iams/workspace/nlib/data/fileupload
# \uc784\uc2dc \uc800\uc7a5 \uc704\uce58
fileupload.temp.subpath = /temp
# \ubb3b\uace0\ub2f5\ud558\uae30 \uac8c\uc2dc\ud310 \uc11c\ube0c\uc704\uce58 : \ucca8\ubd80\ud30c\uc77c \ucd5c\uc0c1\uc704 \uc704\uce58 \uc774\ud558\uc758 \uc704\uce58 \uc815\ubcf4\ub97c \uc124\uc815
fileupload.bbs.qna.subpath = /bbs/qna

View File

@ -30,17 +30,21 @@
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> <%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">묻고답하기 - 글쓰기</c:set> <c:set var="pageTitle">묻고답하기 - 글쓰기</c:set>
<!-- File Upload : 시작 -->
<link rel="stylesheet" href="${pageContext.request.contextPath}/js/fileupload/dropzone.css" /> <link rel="stylesheet" href="${pageContext.request.contextPath}/js/fileupload/dropzone.css" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/js/fileupload/style.css" /> <link rel="stylesheet" href="${pageContext.request.contextPath}/js/fileupload/style.css" />
<script src="${pageContext.request.contextPath}/js/fileupload/dropzone.js"></script> <script src="${pageContext.request.contextPath}/js/fileupload/dropzone.js"></script>
<!-- File Upload : 종료 -->
<h3>${pageTitle }</h3> <h3>${pageTitle }</h3>
<!-- 글쓰기 : 폼 -->
<form:form commandName="reqInfo" <form:form commandName="reqInfo"
action="${pageContext.request.contextPath}/board/listQnAs.do" action="${pageContext.request.contextPath}/board/insertQnA.do"
method="post" method="post">
target="_blank">
<table> <table>
<tr> <tr>
@ -60,7 +64,8 @@
<td><input type="input" name="email" id="email" value="" /></td> <td><input type="input" name="email" id="email" value="" /></td>
</tr> </tr>
<tr> <tr>
<td colspan="2"><textarea name="content" id="content" value=""></textarea></td> <td>내용</td>
<td><textarea name="content" id="content" value=""></textarea></td>
</tr> </tr>
<tr> <tr>
<td>첨부파일</td> <td>첨부파일</td>
@ -72,19 +77,13 @@
onclick="javascript:fileUploadNow();" /> onclick="javascript:fileUploadNow();" />
<input type="button" name="btnNew" id="btnNew" value="취소" <input type="button" name="btnNew" id="btnNew" value="취소"
onclick="javascript:location.href='${pageContext.request.contextPath}/board/listQnAs.do';" /> onclick="javascript:location.href='${pageContext.request.contextPath}/board/listQnAs.do';" />
</form:form> </form:form>
<!-- File Upload -->
<link rel="stylesheet" type="text/css" href="/nlib/js/fileupload/dropzone-nlib.css" />
<!-- <link rel="stylesheet" type="text/css" href="/nlib/js/fileupload/basic-nlib.css" /> -->
<link rel="stylesheet" type="text/css" href="/nlib/js/fileupload/style-nlib.css" />
<script src="/nlib/js/fileupload/dropzone-nlib.js"></script>
<div id="dropzone"> <div id="dropzone">
<form action="${pageContext.request.contextPath}/fileupload/uploadFile.do" <form action="${pageContext.request.contextPath}/fileupload/uploadFile.do"
class="dropzone needsclick" id="myDropzone"> class="dropzone needsclick" id="myDropzone" name="myDropzone">
<div class="dz-message needsclick"> <div class="dz-message needsclick">
<button type="button" class="dz-button">Drop files here or click to select files.</button><br /> <button type="button" class="dz-button">Drop files here or click to select files.</button><br />
<span class="note needsclick">이곳에 파일을 끌어다 놓거나, 클릭하여 올릴 파일을 선택하세요.</span> <span class="note needsclick">이곳에 파일을 끌어다 놓거나, 클릭하여 올릴 파일을 선택하세요.</span>
@ -92,30 +91,31 @@
</form> </form>
</div> </div>
<script type="text/javaScript" language="javascript"> <script type="text/javaScript" language="javascript">
Dropzone.options.myDropzone = {
paramName: "file", // The name that will be used to transfer the file // 파일업로드 객체 생성
var myDropzone = new Dropzone("form#myDropzone", { url: "${pageContext.request.contextPath}/fileupload/uploadFilesAjax.do?subPathKey=fileupload.bbs.qna.subpath"});
accept: function(file, done) {
//alert("file.name=" + file.name); // 각 파일별 업로드 성공시 호출됨
if (file.name == "justinbieber.jpg") { myDropzone.on("success", function(file) {
done("Naha, you don't."); alert("success : " + file.name);
} });
else {
//alert("file.name 2 =" + file.name); myDropzone.on("complete", function(file) {
//done(); alert("complete : " + file.name);
//alert("called done()") });
}
} myDropzone.on("queuecomplete", function() {
}; alert("queuecomplete : " + file.name);
});
function fileUploadNow() {
alert("ok");
Dropzone.processQueue(); function fileUploadNow() {
} myDropzone.processQueue();
}
</script> </script>

View File

@ -1,9 +1,9 @@
<% <%
/** /**
* <pre> * <pre>
* @Class Name : getSampleInfo.jsp * @Class Name : listNotices.jsp
* *
* @Description : RESTful API 호출 샘플 * @Description : JS-GRID 샘플 화면
* *
* *
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021) * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
@ -30,7 +30,8 @@
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %> <%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="pageTitle">QRCode 회원정보</c:set>
<c:set var="pageTitle">공지사항</c:set>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
@ -41,11 +42,10 @@
<link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid.css" /> <link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid.css" />
<link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid-theme.css" /> <link type="text/css" rel="stylesheet" href="/nlib/js/jsgrid/nlib-jsgrid-theme.css" />
<script src="/nlib/js/jsgrid/nlib-jsgrid.js"></script> <script src="/nlib/js/jsgrid/nlib-jsgrid.js"></script>
</head> </head>
<body> <body>
<!-- javascript warning tag -->
<noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript>
<form:form commandName="reqInfo" <form:form commandName="reqInfo"
action="${pageContext.request.contextPath}/sample/barcode/getMemberQRCode.do" method="post" action="${pageContext.request.contextPath}/sample/barcode/getMemberQRCode.do" method="post"
target="_blank" target="_blank"
@ -58,6 +58,7 @@
<script type="text/javaScript" language="javascript"> <script type="text/javaScript" language="javascript">
// 그리드 데이터 // 그리드 데이터
var clients = [ var clients = [
{ "noticeNo": 1, "noticeType": "01", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" }, { "noticeNo": 1, "noticeType": "01", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },

View File

@ -25,6 +25,7 @@
<li><a href="#" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/sample/getSampleInfoForm.do';">통신API</a></li> <li><a href="#" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/sample/getSampleInfoForm.do';">통신API</a></li>
<li><a href="#" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/sample/barcode/getMemberQRCodeForm.do';">QR코드</a></li> <li><a href="#" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/sample/barcode/getMemberQRCodeForm.do';">QR코드</a></li>
<li><a href="#" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/sample/password/getSampleEncoder.do';">암호화</a></li> <li><a href="#" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/sample/password/getSampleEncoder.do';">암호화</a></li>
<li><a href="#" style="color:#FF5;" onclick="javascript:location.href='${pageContext.request.contextPath}/system/reloadProperties.do';">프로퍼티갱신</a></li>
</ul> </ul>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -170,10 +170,11 @@
box-sizing: border-box; } box-sizing: border-box; }
.dropzone { .dropzone {
min-height: 150px; min-height: 80px; /* NLIB */
border: 2px solid rgba(0, 0, 0, 0.3); border: 2px solid rgba(0, 0, 0, 0.3);
background: white; background: white;
padding: 54px 54px; } padding: 0px 10px; /* NLIB */
}
.dropzone.dz-clickable { .dropzone.dz-clickable {
cursor: pointer; } cursor: pointer; }
.dropzone.dz-clickable * { .dropzone.dz-clickable * {
@ -188,7 +189,7 @@
opacity: 0.5; } opacity: 0.5; }
.dropzone .dz-message { .dropzone .dz-message {
text-align: center; text-align: center;
margin: 2em 0; } margin: 1em 0; }
.dropzone .dz-message .dz-button { .dropzone .dz-message .dz-button {
background: none; background: none;
color: inherit; color: inherit;
@ -202,7 +203,8 @@
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
margin: 16px; margin: 16px;
min-height: 100px; } min-height: 60px; /* NLIB */
}
.dropzone .dz-preview:hover { .dropzone .dz-preview:hover {
z-index: 1000; } z-index: 1000; }
.dropzone .dz-preview:hover .dz-details { .dropzone .dz-preview:hover .dz-details {
@ -240,7 +242,7 @@
font-size: 13px; font-size: 13px;
min-width: 100%; min-width: 100%;
max-width: 100%; max-width: 100%;
padding: 2em 1em; padding: 0em 1em; /* NLIB */
text-align: center; text-align: center;
color: rgba(0, 0, 0, 0.9); color: rgba(0, 0, 0, 0.9);
line-height: 150%; } line-height: 150%; }
@ -273,7 +275,7 @@
border-radius: 20px; border-radius: 20px;
overflow: hidden; overflow: hidden;
width: 120px; width: 120px;
height: 120px; height: 60px; /* NLIB */
position: relative; position: relative;
display: block; display: block;
z-index: 10; } z-index: 10; }

View File

@ -124,28 +124,33 @@
createImageThumbnails: true, createImageThumbnails: true,
maxThumbnailFilesize: 10, maxThumbnailFilesize: 10,
thumbnailWidth: 120, thumbnailWidth: 120,
thumbnailHeight: 120, //thumbnailHeight: 120,
thumbnailHeight: 60, // NLIB
filesizeBase: 1000, filesizeBase: 1000,
maxFiles: null, maxFiles: null,
params: {}, params: {},
clickable: true, clickable: true,
ignoreHiddenFiles: true, ignoreHiddenFiles: true,
acceptedFiles: null, // acceptedFiles: null,
acceptedFiles: "image/*", // NLIB
acceptedMimeTypes: null, acceptedMimeTypes: null,
autoProcessQueue: true, //autoProcessQueue: true,
autoProcessQueue: false, // NLIB
autoQueue: true, autoQueue: true,
addRemoveLinks: false, //addRemoveLinks: false,
addRemoveLinks: true, // NLIB
previewsContainer: null, previewsContainer: null,
capture: null, capture: null,
dictDefaultMessage: "Drop files here to upload", dictDefaultMessage: "Drop files here to upload",
dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.", dictFallbackMessage: "파일 드래그앤드랍을 지원하지 않는 브라우저입니다.", // "Your browser does not support drag'n'drop file uploads.",
dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.", dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.",
dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.", dictFileTooBig: "파일이 너무 큽니다({{filesize}}MiB). 최대 크기 {{maxFilesize}}MiB를 넘을 수 없습니다.", // "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",
dictInvalidFileType: "You can't upload files of this type.", dictInvalidFileType: "You can't upload files of this type.",
dictResponseError: "Server responded with {{statusCode}} code.", dictResponseError: "Server responded with {{statusCode}} code.",
dictCancelUpload: "Cancel upload", dictCancelUpload: "Cancel upload",
dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?", dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?",
dictRemoveFile: "Remove file", //dictRemoveFile: "Remove file",
dictRemoveFile: "취소", // NLIB
dictRemoveFileConfirmation: null, dictRemoveFileConfirmation: null,
dictMaxFilesExceeded: "You can not upload any more files.", dictMaxFilesExceeded: "You can not upload any more files.",
accept: function(file, done) { accept: function(file, done) {
@ -1429,7 +1434,8 @@
return element.dropzone; return element.dropzone;
}; };
Dropzone.autoDiscover = true; //Dropzone.autoDiscover = true;
Dropzone.autoDiscover = false; // NLIB
Dropzone.discover = function() { Dropzone.discover = function() {
var checkElements, dropzone, dropzones, _i, _len, _results; var checkElements, dropzone, dropzones, _i, _len, _results;

View File

@ -325,7 +325,7 @@ table {
font-size: 0.8em; font-size: 0.8em;
font-weight: 200; font-weight: 200;
display: block; display: block;
margin-top: 1.4rem; } margin-top: 1.3rem; }
*, *:before, *:after { *, *:before, *:after {
box-sizing: border-box; } box-sizing: border-box; }