파일업로드 처리 : 중간백업
This commit is contained in:
parent
494314f93a
commit
6f890bc00d
19
pom.xml
19
pom.xml
@ -207,7 +207,24 @@
|
||||
<artifactId>tiles-jsp</artifactId>
|
||||
<version>3.0.8</version>
|
||||
</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>
|
||||
|
||||
<build>
|
||||
|
||||
@ -1,15 +1,22 @@
|
||||
|
||||
package nlib.bbs.web;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
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;
|
||||
|
||||
@Controller
|
||||
|
||||
17
src/main/java/nlib/cmm/exception/ErrorMessage.java
Normal file
17
src/main/java/nlib/cmm/exception/ErrorMessage.java
Normal 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;
|
||||
}
|
||||
|
||||
}
|
||||
@ -2,87 +2,185 @@ package nlib.cmm.fileupload;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
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.ui.ModelMap;
|
||||
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.MultipartHttpServletRequest;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import egovframework.com.cmm.EgovWebUtil;
|
||||
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;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* @Class Name : FileUploadController.java
|
||||
*
|
||||
* @Description : 파일 업로드를 처리하는 컨트롤러
|
||||
*
|
||||
*
|
||||
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @ ------------ -------- ---------------------------
|
||||
* @ 수정일 수정자 수정내용
|
||||
* @ ------------ -------- ---------------------------
|
||||
* @ 2021. 7. 15. KNKIM 최초 생성
|
||||
*
|
||||
*
|
||||
* @author 이씨플라자 * DIGITALSHIP KNKIM
|
||||
* @since 2021. 7. 15.
|
||||
* @version 1.0
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
public class FileUploadController {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(FileUploadController.class);
|
||||
private static final Logger log = LoggerFactory.getLogger(FileUploadController.class);
|
||||
|
||||
@RequestMapping("/fileupload/uploadFile.do")
|
||||
public String uploadFile(final MultipartHttpServletRequest multiRequest
|
||||
, ModelMap model) throws Exception {
|
||||
@Resource(name="nlibProperty")
|
||||
NlibProperty nlibProperty;
|
||||
|
||||
|
||||
/**
|
||||
* 첨부파일이 저장되는 최상위 위치
|
||||
*/
|
||||
@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();
|
||||
if(!files.isEmpty()) {
|
||||
// TODO : 권한 체크 추가할 것
|
||||
|
||||
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;
|
||||
String filePath = "";
|
||||
List<FileVO> result = new ArrayList<FileVO>();
|
||||
FileVO fvo;
|
||||
|
||||
int fileKey = 1;
|
||||
while (itr.hasNext()) {
|
||||
Entry<String, MultipartFile> entry = itr.next();
|
||||
|
||||
file = entry.getValue();
|
||||
String orginFileName = file.getOriginalFilename();
|
||||
|
||||
//--------------------------------------
|
||||
// 원 파일명이 없는 경우 처리
|
||||
// (첨부가 되지 않은 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();
|
||||
// 서브 위치
|
||||
if(StringUtil.isEmpty(subPathKey)) throw new Exception("첨부파일이 저장되는 위치정보값이 정확하지 않습니다.");
|
||||
String subPath = nlibProperty.getProperty(subPathKey);
|
||||
if(FileUtil.isNotValid(subPath)) throw new Exception("첨부파일 서브 위치값이 적절하지 않습니다.");
|
||||
|
||||
final Map<String, MultipartFile> files = multiRequest.getFileMap();
|
||||
log.debug("uploadFilesAjax : 진입 " + (files == null ? " files null " : files.size()));
|
||||
|
||||
File dir = new File(FILEUPLOAD_BASE_PATH + subPath);
|
||||
if(!dir.exists() || !dir.isDirectory()) dir.mkdirs();
|
||||
|
||||
if(!files.isEmpty()) {
|
||||
|
||||
log.debug("FILE UPLOAD : File New Name=" + newName);
|
||||
|
||||
if (!"".equals(orginFileName)) {
|
||||
filePath = "c:/temp/data" + File.separator + newName;
|
||||
file.transferTo(new File(EgovWebUtil.filePathBlackList(filePath)));
|
||||
}
|
||||
Iterator<Entry<String, MultipartFile>> itr = files.entrySet().iterator();
|
||||
MultipartFile file;
|
||||
String filePath = "";
|
||||
FileVO fvo;
|
||||
|
||||
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));
|
||||
int fileKey = 1;
|
||||
while (itr.hasNext()) {
|
||||
Entry<String, MultipartFile> entry = itr.next();
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -52,6 +52,7 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
.antMatchers("/js/**")
|
||||
.antMatchers("/temp/**")
|
||||
.antMatchers("/favicon/**")
|
||||
.antMatchers("/*/*Ajax.do")
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
53
src/main/java/nlib/util/FileUtil.java
Normal file
53
src/main/java/nlib/util/FileUtil.java
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
@ -33,3 +33,16 @@ dataapi.temp.xml.path = C:/iams/workspace/nlib/data/dataxml
|
||||
# Aria \uc54c\uace0\ub9ac\uc998
|
||||
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
|
||||
|
||||
|
||||
@ -30,17 +30,21 @@
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
|
||||
|
||||
<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/style.css" />
|
||||
<script src="${pageContext.request.contextPath}/js/fileupload/dropzone.js"></script>
|
||||
<!-- File Upload : 종료 -->
|
||||
|
||||
<h3>${pageTitle }</h3>
|
||||
|
||||
<!-- 글쓰기 : 폼 -->
|
||||
<form:form commandName="reqInfo"
|
||||
action="${pageContext.request.contextPath}/board/listQnAs.do"
|
||||
method="post"
|
||||
target="_blank">
|
||||
action="${pageContext.request.contextPath}/board/insertQnA.do"
|
||||
method="post">
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
@ -60,7 +64,8 @@
|
||||
<td><input type="input" name="email" id="email" value="" /></td>
|
||||
</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>
|
||||
<td>첨부파일</td>
|
||||
@ -72,19 +77,13 @@
|
||||
onclick="javascript:fileUploadNow();" />
|
||||
<input type="button" name="btnNew" id="btnNew" value="취소"
|
||||
onclick="javascript:location.href='${pageContext.request.contextPath}/board/listQnAs.do';" />
|
||||
|
||||
|
||||
</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">
|
||||
<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">
|
||||
<button type="button" class="dz-button">Drop files here or click to select files.</button><br />
|
||||
<span class="note needsclick">이곳에 파일을 끌어다 놓거나, 클릭하여 올릴 파일을 선택하세요.</span>
|
||||
@ -92,30 +91,31 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javaScript" language="javascript">
|
||||
|
||||
Dropzone.options.myDropzone = {
|
||||
paramName: "file", // The name that will be used to transfer the file
|
||||
|
||||
accept: function(file, done) {
|
||||
//alert("file.name=" + file.name);
|
||||
if (file.name == "justinbieber.jpg") {
|
||||
done("Naha, you don't.");
|
||||
}
|
||||
else {
|
||||
//alert("file.name 2 =" + file.name);
|
||||
//done();
|
||||
//alert("called done()")
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function fileUploadNow() {
|
||||
alert("ok");
|
||||
|
||||
Dropzone.processQueue();
|
||||
}
|
||||
|
||||
// 파일업로드 객체 생성
|
||||
var myDropzone = new Dropzone("form#myDropzone", { url: "${pageContext.request.contextPath}/fileupload/uploadFilesAjax.do?subPathKey=fileupload.bbs.qna.subpath"});
|
||||
|
||||
// 각 파일별 업로드 성공시 호출됨
|
||||
myDropzone.on("success", function(file) {
|
||||
alert("success : " + file.name);
|
||||
});
|
||||
|
||||
myDropzone.on("complete", function(file) {
|
||||
alert("complete : " + file.name);
|
||||
});
|
||||
|
||||
myDropzone.on("queuecomplete", function() {
|
||||
alert("queuecomplete : " + file.name);
|
||||
});
|
||||
|
||||
|
||||
|
||||
function fileUploadNow() {
|
||||
myDropzone.processQueue();
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<%
|
||||
/**
|
||||
* <pre>
|
||||
* @Class Name : getSampleInfo.jsp
|
||||
* @Class Name : listNotices.jsp
|
||||
*
|
||||
* @Description : RESTful API 호출 샘플
|
||||
* @Description : JS-GRID 샘플 화면
|
||||
*
|
||||
*
|
||||
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
||||
@ -30,7 +30,8 @@
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
<%@ 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>
|
||||
<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-theme.css" />
|
||||
<script src="/nlib/js/jsgrid/nlib-jsgrid.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- javascript warning tag -->
|
||||
<noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript>
|
||||
<form:form commandName="reqInfo"
|
||||
action="${pageContext.request.contextPath}/sample/barcode/getMemberQRCode.do" method="post"
|
||||
target="_blank"
|
||||
@ -58,6 +58,7 @@
|
||||
|
||||
|
||||
<script type="text/javaScript" language="javascript">
|
||||
|
||||
// 그리드 데이터
|
||||
var clients = [
|
||||
{ "noticeNo": 1, "noticeType": "01", "title": "공지사항 제목입니다.", "readCount": 7, "regDate": "2021-07-11" },
|
||||
|
||||
@ -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/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}/system/reloadProperties.do';">프로퍼티갱신</a></li>
|
||||
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
|
||||
@ -170,10 +170,11 @@
|
||||
box-sizing: border-box; }
|
||||
|
||||
.dropzone {
|
||||
min-height: 150px;
|
||||
min-height: 80px; /* NLIB */
|
||||
border: 2px solid rgba(0, 0, 0, 0.3);
|
||||
background: white;
|
||||
padding: 54px 54px; }
|
||||
padding: 0px 10px; /* NLIB */
|
||||
}
|
||||
.dropzone.dz-clickable {
|
||||
cursor: pointer; }
|
||||
.dropzone.dz-clickable * {
|
||||
@ -188,7 +189,7 @@
|
||||
opacity: 0.5; }
|
||||
.dropzone .dz-message {
|
||||
text-align: center;
|
||||
margin: 2em 0; }
|
||||
margin: 1em 0; }
|
||||
.dropzone .dz-message .dz-button {
|
||||
background: none;
|
||||
color: inherit;
|
||||
@ -202,7 +203,8 @@
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin: 16px;
|
||||
min-height: 100px; }
|
||||
min-height: 60px; /* NLIB */
|
||||
}
|
||||
.dropzone .dz-preview:hover {
|
||||
z-index: 1000; }
|
||||
.dropzone .dz-preview:hover .dz-details {
|
||||
@ -240,7 +242,7 @@
|
||||
font-size: 13px;
|
||||
min-width: 100%;
|
||||
max-width: 100%;
|
||||
padding: 2em 1em;
|
||||
padding: 0em 1em; /* NLIB */
|
||||
text-align: center;
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
line-height: 150%; }
|
||||
@ -273,7 +275,7 @@
|
||||
border-radius: 20px;
|
||||
overflow: hidden;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
height: 60px; /* NLIB */
|
||||
position: relative;
|
||||
display: block;
|
||||
z-index: 10; }
|
||||
|
||||
@ -124,28 +124,33 @@
|
||||
createImageThumbnails: true,
|
||||
maxThumbnailFilesize: 10,
|
||||
thumbnailWidth: 120,
|
||||
thumbnailHeight: 120,
|
||||
//thumbnailHeight: 120,
|
||||
thumbnailHeight: 60, // NLIB
|
||||
filesizeBase: 1000,
|
||||
maxFiles: null,
|
||||
params: {},
|
||||
clickable: true,
|
||||
ignoreHiddenFiles: true,
|
||||
acceptedFiles: null,
|
||||
// acceptedFiles: null,
|
||||
acceptedFiles: "image/*", // NLIB
|
||||
acceptedMimeTypes: null,
|
||||
autoProcessQueue: true,
|
||||
//autoProcessQueue: true,
|
||||
autoProcessQueue: false, // NLIB
|
||||
autoQueue: true,
|
||||
addRemoveLinks: false,
|
||||
//addRemoveLinks: false,
|
||||
addRemoveLinks: true, // NLIB
|
||||
previewsContainer: null,
|
||||
capture: null,
|
||||
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.",
|
||||
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.",
|
||||
dictResponseError: "Server responded with {{statusCode}} code.",
|
||||
dictCancelUpload: "Cancel upload",
|
||||
dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?",
|
||||
dictRemoveFile: "Remove file",
|
||||
//dictRemoveFile: "Remove file",
|
||||
dictRemoveFile: "취소", // NLIB
|
||||
dictRemoveFileConfirmation: null,
|
||||
dictMaxFilesExceeded: "You can not upload any more files.",
|
||||
accept: function(file, done) {
|
||||
@ -1429,7 +1434,8 @@
|
||||
return element.dropzone;
|
||||
};
|
||||
|
||||
Dropzone.autoDiscover = true;
|
||||
//Dropzone.autoDiscover = true;
|
||||
Dropzone.autoDiscover = false; // NLIB
|
||||
|
||||
Dropzone.discover = function() {
|
||||
var checkElements, dropzone, dropzones, _i, _len, _results;
|
||||
|
||||
@ -325,7 +325,7 @@ table {
|
||||
font-size: 0.8em;
|
||||
font-weight: 200;
|
||||
display: block;
|
||||
margin-top: 1.4rem; }
|
||||
margin-top: 1.3rem; }
|
||||
|
||||
*, *:before, *:after {
|
||||
box-sizing: border-box; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user