이지우 - 이노릭스 버전업 작업
This commit is contained in:
parent
39aaebbe7a
commit
e840b9a7db
@ -104,6 +104,5 @@
|
||||
<mvc:resources mapping="/AnySign4PC/**" location="/AnySign4PC/" />
|
||||
<mvc:resources mapping="/html/**" location="/html/" />
|
||||
<mvc:resources mapping="/innorix/**" location="/innorix/" />
|
||||
<mvc:resources mapping="/innorix_2/**" location="/innorix_2/" />
|
||||
|
||||
</beans>
|
||||
@ -15,10 +15,9 @@
|
||||
|
||||
control.on('loadComplete', function (p) { // 다운로드 파일 추가
|
||||
var urlBase = location.href.substring(0, location.href.lastIndexOf("/") + 1);
|
||||
console.log('urlBase :', urlBase);
|
||||
control.presetDownloadFiles(
|
||||
[{
|
||||
printFileName: "INNORIX WP 브로셔!!!.pdf",
|
||||
printFileName: "INNORIX WP 브로셔.pdf",
|
||||
fileSize: 1433885,
|
||||
downloadUrl: urlBase + "download.jsp?fileID=1"
|
||||
},
|
||||
|
||||
@ -3,6 +3,9 @@
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<%
|
||||
out.clear();
|
||||
out = pageContext.pushBody();
|
||||
|
||||
String saveDir = delimiterReplace(request.getRealPath(request.getServletPath()));
|
||||
String filePath = saveDir.substring(0, saveDir.lastIndexOf("/") + 1);
|
||||
|
||||
@ -14,8 +17,6 @@ String filePath = saveDir.substring(0, saveDir.lastIndexOf("/") + 1);
|
||||
유닉스 - /storage/path1/path2/data
|
||||
*/
|
||||
|
||||
// filePath = request.getParameter("innoDirPath");
|
||||
filePath = "D:/usr/local/tomcat/file/sht/";
|
||||
// downloadType : "stream" 설정시 자동 전달되는 GET Param 값
|
||||
String szStartOffset = request.getParameter("_StartOffset");
|
||||
String szEndOffset = request.getParameter("_EndOffset");
|
||||
@ -25,6 +26,7 @@ String fileID = request.getParameter("fileID");
|
||||
String fileName = request.getParameter("fileName");
|
||||
String sysFileName = new String();
|
||||
String orgFileName = new String();
|
||||
String htmlMode = request.getParameter("_Html5");
|
||||
|
||||
if (fileID != null) {
|
||||
if (fileID.equals("1")) {
|
||||
@ -44,10 +46,8 @@ if (fileID != null) {
|
||||
}
|
||||
|
||||
if (fileName != null) {
|
||||
sysFileName = "" + fileName;
|
||||
sysFileName = "" + fileName;
|
||||
// orgFileName = "data/" + fileName;
|
||||
// orgFileName = "data/" + fileName;
|
||||
sysFileName = "data/" + fileName;
|
||||
orgFileName = fileName;
|
||||
}
|
||||
|
||||
// 파일명 깨짐대응 문자열 인코딩 처리
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../innorix.css">
<script src="../innorix.js"></script>
<script>
var control = new Object();
window.onload = function() {
// 파일전송 컨트롤 생성
control = innorix.create({
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
transferMode: 'both', // 업로드, 다운로드 혼합사용
agent: false, // true = Agent 설치, false = html5 모드 사용
installUrl: '../install/install.html', // Agent 설치 페이지
uploadUrl: './upload.jsp', // 업로드 URL
// width : 550, // 컨트롤 출력 너비(pixel)
height : 100 // 컨트롤 출력 높이(pixel)
});
// 업로드 완료 이벤트
control.on('uploadComplete', function (p) {
alert("업로드가 완료 되었습니다.\n다운로드 가능하게 재구성 합니다.");
var urlBase = location.href.substring(0, location.href.lastIndexOf("/") + 1);
var fileArray = new Array();
var f = p.files;
for (var i = 0; i < f.length; i++ ) {
var fileObj = new Object();
fileObj.printFileName = f[i].clientFileName;
fileObj.fileSize = f[i].fileSize;
fileObj.downloadUrl = urlBase + "download.jsp?fileName=" + f[i].serverFileName;
fileArray.push(fileObj);
}
control.removeAllFiles(); // 파일을 삭제
control.presetDownloadFiles(fileArray); // 다운로드 목록을 구성
});
};
</script>
</head>
<body>
<!-- <a href="../index.html">← 예제 목록</a><br /><br /> -->
<div id="fileControl"></div><br/>
<input type="button" value="파일추가" onclick="control.openFileDialog();"/>
<input type="button" value="업로드" class="uploadBtn" onclick="control.upload();"/> |
<input type="button" value="선택파일 다운로드" onclick="control.downloadSelectedFiles();"/>
<input type="button" value="전체 다운로드" onclick="control.download();"/>
</body>
</html>
|
||||
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../innorix.css">
<script src="../innorix.js"></script>
<script>
var control = new Object();
window.onload = function() {
// 파일전송 컨트롤 생성
control = innorix.create({
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
transferMode: 'both', // 업로드, 다운로드 혼합사용
agent: false, // true = Agent 설치, false = html5 모드 사용
installUrl: '../install/install.html', // Agent 설치 페이지
uploadUrl: './upload.jsp' // 업로드 URL
});
// 업로드 완료 이벤트
control.on('uploadComplete', function (p) {
alert("업로드가 완료 되었습니다.\n다운로드 가능하게 재구성 합니다.");
var urlBase = location.href.substring(0, location.href.lastIndexOf("/") + 1);
var fileArray = new Array();
var f = p.files;
for (var i = 0; i < f.length; i++ ) {
var fileObj = new Object();
fileObj.printFileName = f[i].clientFileName;
fileObj.fileSize = f[i].fileSize;
fileObj.downloadUrl = urlBase + "download.jsp?fileName=" + f[i].serverFileName;
fileArray.push(fileObj);
}
control.removeAllFiles(); // 파일을 삭제
control.presetDownloadFiles(fileArray); // 다운로드 목록을 구성
});
};
</script>
</head>
<body>
<a href="../index.html">← 예제 목록</a><br /><br />
<div id="fileControl"></div><br/>
<input type="button" value="파일추가" onclick="control.openFileDialog();"/>
<input type="button" value="업로드" onclick="control.upload();"/> |
<input type="button" value="선택파일 다운로드" onclick="control.downloadSelectedFiles();"/>
<input type="button" value="전체 다운로드" onclick="control.download();"/>
</body>
</html>
|
||||
@ -16,7 +16,6 @@
|
||||
|
||||
control.on('loadComplete', function (p) { // 다운로드 파일 추가
|
||||
var urlBase = location.href.substring(0, location.href.lastIndexOf("/") + 1);
|
||||
console.log('urlBase :: ', urlBase);
|
||||
control.presetDownloadFiles(
|
||||
[{
|
||||
printFileName: "INNORIX WP 브로셔.pdf",
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- <a href="../index.html">← 예제 목록</a><br /><br /> -->
|
||||
<a href="../index.html">← 예제 목록</a><br /><br />
|
||||
|
||||
<div id="fileControl"></div><br/>
|
||||
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<!-- <link rel="stylesheet" href="../innorix.css"> -->
|
||||
<link rel="stylesheet" href="/innorix/innorix.css">
|
||||
<!-- <script src="../innorix.js"></script> -->
|
||||
<script src="/innorix/innorix_dev.js"></script>
|
||||
<link rel="stylesheet" href="../innorix.css">
|
||||
<script src="../innorix.js"></script>
|
||||
<script>
|
||||
var control = new Object();
|
||||
window.onload = function() {
|
||||
@ -12,9 +10,8 @@
|
||||
control = innorix.create({
|
||||
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
|
||||
transferMode: 'both', // 업로드, 다운로드 혼합사용
|
||||
installUrl: '/innorix/install/install.html', // Agent 설치 페이지
|
||||
uploadUrl: '/innorix/exam/upload.jsp' // 업로드 URL
|
||||
/* uploadUrl: '/innorix/exam/upload_test_220916.jsp' // 업로드 URL */
|
||||
installUrl: '../install/install.html', // Agent 설치 페이지
|
||||
uploadUrl: './upload.jsp' // 업로드 URL
|
||||
});
|
||||
|
||||
// 업로드 완료 이벤트
|
||||
@ -31,7 +28,7 @@
|
||||
var files = JSON.stringify(f);
|
||||
var innoJquery = innorix._load("innoJquery");
|
||||
innoJquery('form#f_write').append('<input type="hidden" name="files" id="files" value=\'' + files + '\' />');
|
||||
// innoJquery('form#f_write').submit();
|
||||
innoJquery('form#f_write').submit();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -1,18 +1,14 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.innorix.transfer.InnorixUpload" %>
|
||||
<%-- <%@ page import="egovframework.rte.fdl.property.EgovPropertyService" %> --%>
|
||||
|
||||
<%
|
||||
// CORS체크를 위한 OPTIONS 메소드가 들어오므로 POST 일 경우에만 동작하도록 조건 추가
|
||||
if (request.getMethod().equals("POST"))
|
||||
{
|
||||
String directory = InnorixUpload.getServletAbsolutePath(request);
|
||||
// directory = directory.substring(0, directory.lastIndexOf("/") + 1) + "data";
|
||||
// directory = PropertyService.getString("Globals.fileStorePath");
|
||||
directory = "/usr/local/tomcat/file/sht/";
|
||||
directory = directory.substring(0, directory.lastIndexOf("/") + 1) + "data";
|
||||
int maxPostSize = 2147482624; // bytes
|
||||
|
||||
|
||||
|
||||
InnorixUpload uploader = new InnorixUpload(request, response, maxPostSize, directory);
|
||||
|
||||
/*
|
||||
@ -35,26 +31,6 @@ if (request.getMethod().equals("POST"))
|
||||
String _type = uploader.getParameter("type"); // 커스텀 정의 POST Param 1
|
||||
String _part = uploader.getParameter("part"); // 커스텀 정의 POST Param 2
|
||||
String _transferId = uploader.getParameter("_transferId"); // TransferId
|
||||
String _innoFilePath = uploader.getParameter("innoDirPath"); // 커스텀 정의 POST Param 2
|
||||
|
||||
/*
|
||||
|
||||
현재 페이지를 호출하는 jsp에서
|
||||
<input type="hidden" id="innoDirPath" value="<spring:eval expression="@globalSettings['Globals.Innorix.FilePath']"/>" />
|
||||
위 코드를 작성하고
|
||||
|
||||
control.upload() 전에
|
||||
|
||||
|
||||
var postObj = new Object();
|
||||
postObj.innoDirPath = $('#innoDirPath').val();
|
||||
control.setPostData(postObj); // 업로드시 함께 전달될 POST Param 추가
|
||||
|
||||
위 코드를 넣어 줘야 함
|
||||
|
||||
*/
|
||||
uploader.setDirectory(_innoFilePath);
|
||||
|
||||
String _run_retval = uploader.run();
|
||||
|
||||
// 개별파일 업로드 완료
|
||||
|
||||
@ -51,7 +51,6 @@
|
||||
// 업로드 완료 이벤트
|
||||
control.on('uploadComplete', function (p) {
|
||||
var f = p.files;
|
||||
console.log('f : ', f);
|
||||
var r = "Upload complete\n\n";
|
||||
for (var i = 0; i < f.length; i++ ) {
|
||||
r += f[i].clientFileName + " " + f[i].fileSize + "\n";
|
||||
@ -139,7 +138,7 @@
|
||||
|
||||
<head>
|
||||
<body>
|
||||
<!-- <a href="../index.html">← 예제 목록</a><br /><br /> -->
|
||||
<a href="../index.html">← 예제 목록</a><br /><br />
|
||||
<div id="dropZone" style="overflow:auto; width:500px; height:200px; border: 1px solid #c0c0c0;">
|
||||
<table id="fileTable" class="fileTable">
|
||||
<thead>
|
||||
|
||||
@ -59,10 +59,33 @@
|
||||
<th>비고</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>01</td>
|
||||
<td class="ta_l">
|
||||
<p>커스텀 포스트데이터 전송(클라이언트→서버)</p>
|
||||
<span class="refer">클라이언트메소트 setPostData, setFilePostDataByIndex를 이용한 포스트 데이터 전송</span>
|
||||
<p>업로드 파일 첨부 시 정책 설정</p>
|
||||
<span class="refer">전체 파일개수, 첨부할 확장자제한/허용, 개별파일 사이즈, 전체파일 사이즈, 중복파일 첨부여부 등을 제어</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/setAddFilePolicy.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>02</td>
|
||||
<td class="ta_l">
|
||||
<p>전송 오류 시 전송 간격 및 횟수 설정</p>
|
||||
<span class="refer">retryCount, retryDelay, maximumErrorCount 옵션 사용방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/setErrorRetry.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>03</td>
|
||||
<td class="ta_l">
|
||||
<p>(클라이언트→서버) 업로드 시 추가 데이터 전송</p>
|
||||
<span class="refer">setPostData, setFilePostDataByIndex를 이용하여 클라이언트단에서 서버단으로 추가 데이터 전송</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/postData.html">샘플보기</a></td>
|
||||
<td>
|
||||
@ -71,10 +94,10 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>04</td>
|
||||
<td class="ta_l">
|
||||
<p>업로드 시 커스텀 벨류 전송(서버→클라이언트)</p>
|
||||
<span class="refer">서버메소드 setCustomValue를 이용한 커스텀 벨류 전송</span>
|
||||
<p>(서버→클라이언트) 업로드 시 커스텀 벨류 전송</p>
|
||||
<span class="refer">setCustomValue를 이용하여 서버단에서 클라이언트단으로 커스텀 벨류 전송</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/uploadCustomValue.html">샘플보기</a></td>
|
||||
<td>
|
||||
@ -83,10 +106,22 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>05</td>
|
||||
<td class="ta_l">
|
||||
<p>업로드 시 커스텀 에러 전송(서버→클라이언트)</p>
|
||||
<span class="refer">InnorixCustomError 커스텀 에러 전송</span>
|
||||
<p>업로드 시 경로 설정 및 저장 파일명 변경</p>
|
||||
<span class="refer">업로드되는 서버의 경로 설정 및 저장 파일명 변경 방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/uploadServerDirChangeName.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>06</td>
|
||||
<td class="ta_l">
|
||||
<p>(서버→클라이언트) 업로드 시 커스텀 에러 전송</p>
|
||||
<span class="refer">업로드 시 서버측 에러메세지 및 에러코드를 클라이언트측으로 반환</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/uploadCustomError.html">샘플보기</a></td>
|
||||
<td>
|
||||
@ -94,82 +129,10 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>07</td>
|
||||
<td class="ta_l">
|
||||
<p>업로드 시 서버 저장경로 변경</p>
|
||||
<span class="refer">서버메소드 setDirectory를 이용한 서버 저장경로 지정</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/uploadSetDirectory.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="ta_l">
|
||||
<p>업로드 시 서버 저장파일명 변경</p>
|
||||
<span class="refer">서버메소드 setFileName를 이용한 저장파일명 변경</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/changeFileName.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="ta_l">
|
||||
<p>업로드 서버경로 숨김 처리</p>
|
||||
<span class="refer">서버메소드 setHideServerPathInfo를 이용한 서버경로 숨김 처리</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/hideServerPathInfo.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="ta_l">
|
||||
<p>업로드 파일 확장자 제한, 그룹화</p>
|
||||
<span class="refer">allowExtension, limitExtension 옵션 활용법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/uploadExtension.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="ta_l">
|
||||
<p>파일첨부 에러 시 메세지 출력(382이상 버전)</p>
|
||||
<span class="refer">addFileError이벤트를 이용한 에러 메세지 출력</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/uploadAddFileError.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="ta_l">
|
||||
<p>파일첨부 에러 시 메세지 출력(373이하 버전)</p>
|
||||
<span class="refer">addFileError이벤트를 이용한 에러 메세지 출력</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/uploadAddFileError_old.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="ta_l">
|
||||
<p>다운로드 시 커스텀 에러 전송(서버→클라이언트)</p>
|
||||
<span class="refer">downloadCustomError 에러코드, 에러메시지 설정</span>
|
||||
<p>(서버→클라이언트) 다운로드 시 커스텀 에러 전송</p>
|
||||
<span class="refer">다운로드 중 서버측 에러메세지 및 에러코드를 클라이언트측으로 반환</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/downloadCustomError.html">샘플보기</a></td>
|
||||
<td>
|
||||
@ -177,56 +140,100 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>08</td>
|
||||
<td class="ta_l">
|
||||
<p>다운로드 이중 무결성</p>
|
||||
<span class="refer">다운로드 간 파일 해시 값을 이용한 이중 무결성 체크 예제</span>
|
||||
<p>다운로드 완료 시 처리방법 예제</p>
|
||||
<span class="refer">다운로드가 완료된 후, 후처리가 필요할 때 처리방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/downloadIntegrity.html">샘플보기</a></td>
|
||||
<td><a class="exam-link" href="./gnexam/downloadCompleted.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>09</td>
|
||||
<td class="ta_l">
|
||||
<p>다운로드 요청 간격 설정</p>
|
||||
<span class="refer">downloadDelay옵션이용 ms단위 다운로드 딜레이 설정</span>
|
||||
<p>폴더구조 첨부 제한, 서버에 폴더구조 업로드 제어</p>
|
||||
<span class="refer">폴더 구조 첨부를 제한하고, 폴더 구조 업로드를 제한할 때 처리방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/downloadDelay.html">샘플보기</a></td>
|
||||
<td><a class="exam-link" href="./gnexam/folderIntact.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td class="ta_l">
|
||||
<p>컨트롤 UI의 폴더 트리구조 관련 옵션 사용 예제</p>
|
||||
<span class="refer">폴더구조를 첨부할 때 보여지는 트리구조 제어(showFolderItems, showFolderItemsTree 사용방법)</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/setFolderTreeItems.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>11</td>
|
||||
<td class="ta_l">
|
||||
<p>폴더구조의 파일로 다운로드 구성 예제</p>
|
||||
<span class="refer">폴더구조의 파일로 다운로드 목록을 구성(presetDownloadFiles)하는 방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/folderDownload.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>12</td>
|
||||
<td class="ta_l">
|
||||
<p>폴더구조 파일 combine예제</p>
|
||||
<span class="refer">폴더구조의 파일을 업로드하고, 업로드한 파일로 다운로드 목록이 구성되게 하는 예제</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/folderCombine.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>13</td>
|
||||
<td class="ta_l">
|
||||
<p>사용자가 다운로드 경로 지정, 다운로드 완료 후 탐색기열기</p>
|
||||
<span class="refer">사용자가 다운로드될 경로를 지정할 수 있고, 다운로드 완료 후 탐색기를 열어줄 수 있는 예제</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/setDownloadPath.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>14</td>
|
||||
<td class="ta_l">
|
||||
<p>전송 조각 사이즈변경, 세션 개수 설정</p>
|
||||
<span class="refer">기본 조각 사이즈 2MB, 세션 16개가 적용되어있고 이를 수정가능</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/setSliceSizeSessionCount.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>15</td>
|
||||
<td class="ta_l">
|
||||
<p>압축(.zip)하여 파일 다운로드</p>
|
||||
<span class="refer">파일 다운로드 시 파일을 압축하여 다운로드</span>
|
||||
<p>컨트롤 파일목록의 선택, 이동, 삭제 아이콘 제어</p>
|
||||
<span class="refer">컨트롤에 첨부된 파일목록의 기능 아이콘을 제어하는 showSelectBox, showFuncBtn 옵션 사용방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/zipCombine.html">샘플보기</a></td>
|
||||
<td><a class="exam-link" href="./gnexam/setFuncBtn.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>16</td>
|
||||
<td class="ta_l">
|
||||
<p>설정된 드랍존 영역을 확인하는 방법</p>
|
||||
<span class="refer">isDebugDropZone옵션을 활용한 드랍존 영역 표시</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/debugDropZone.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="ta_l">
|
||||
<p>출력 언어 설정(한글/영어)</p>
|
||||
<span class="refer">영어 메시지를 기본으로 출력하며 설정을 한글로 변경</span>
|
||||
<p>출력 메세지 언어 전환(한/영)</p>
|
||||
<span class="refer">출력되는 메세지는 기본 영문으로, 이를 한글로 설정하는 방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/setLanguage.html">샘플보기</a></td>
|
||||
<td>
|
||||
@ -235,153 +242,69 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>17</td>
|
||||
<td class="ta_l">
|
||||
<p>에이전트 설치 시 팝업창으로 출력</p>
|
||||
<span class="refer">installPopupWindow옵션활용 설치페이지 팝업창으로 출력</span>
|
||||
<p>컨트롤 옵션 동적 설정 예제</p>
|
||||
<span class="refer">컨트롤 옵션을 setOption을 통해 설정하는 방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/installPopup.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="ta_l">
|
||||
<p>삭제한 파일정보를 서버에 출력</p>
|
||||
<span class="refer">파일추가 후 업로드 전 삭제된 파일에대한 정보출력</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/deleteFileInfo.html">샘플보기</a></td>
|
||||
<td><a class="exam-link" href="./gnexam/setOption.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>18</td>
|
||||
<td class="ta_l">
|
||||
<p>전송 조각 사이즈변경, 세션 개수 설정</p>
|
||||
<span class="refer">기본 조각 사이즈 2MB, 세션 16개가 적용</span>
|
||||
<p>컨트롤 동적 생성 예제</p>
|
||||
<span class="refer">동적으로 컨트롤을 생성하고 제어하는 방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/sliceSizeSession.html">샘플보기</a></td>
|
||||
<td><a class="exam-link" href="./gnexam/dynamicCreate.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>19</td>
|
||||
<td class="ta_l">
|
||||
<p>오류 시 전송 시도 횟수</p>
|
||||
<span class="refer">retryCount, retryDelay, maximumErrorCount 옵션활용</span>
|
||||
<p>Html5모드 다운로드 요청 간격 설정</p>
|
||||
<span class="refer">Html5모드에서 다운로드 시 downloadDelay옵션을 이용한 다운로드 딜레이 설정 방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/errorRetryCount.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="ta_l">
|
||||
<p>다운로드목록 구성 시 파일사이즈를 가상의사이즈로 지정 (Agent 모드)</p>
|
||||
<span class="refer">isTempFileSize 옵션을 활용한 가상파일 사이즈 선언</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/isTempFileSize.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="ta_l">
|
||||
<p>다운로드목록 구성 시 파일사이즈를 가상의사이즈로 지정 (Html5 모드)</p>
|
||||
<span class="refer">skipFileSizeCheck 옵션을 활용한 파일 사이즈 체크 건너 뜀용</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/skipFileSizeCheck.html">샘플보기</a></td>
|
||||
<td><a class="exam-link" href="./gnexam/setDownloadDelay.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>20</td>
|
||||
<td class="ta_l">
|
||||
<p>폴더구조 업로드, 다운로드</p>
|
||||
<span class="refer">folderIntact, showFolderItems 옵션활용</span>
|
||||
<p>업로드 완료 시 클라이언트단에 서버경로 숨김처리</p>
|
||||
<span class="refer">setHideServerPathInfo 메소드를 이용해 업로드 간 메타정보 상 노출되는 서버 경로를 숨기기 위한 방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/upDownFolder.html">샘플보기</a></td>
|
||||
<td><a class="exam-link" href="./gnexam/setHideServerPathInfo.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>21</td>
|
||||
<td class="ta_l">
|
||||
<p>리스트 전송창 모드에서 파일별 전송상태 출력</p>
|
||||
<span class="refer">showTransferFileStatus 옵션활용</span>
|
||||
<p>첨부파일 압축 업로드 및 압축해제 다운로드 예제</p>
|
||||
<span class="refer">isCompress 메소드를 이용해 업로드시 서버에 압축하여 저장 및, setAutoDecompress이용하여 다운시 자동 압축해제</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/showTransferFileStatus.html">샘플보기</a></td>
|
||||
<td><a class="exam-link" href="./gnexam/compressCombine.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="ta_l">
|
||||
<p>파일 아이템 이동, 삭제 기능버튼 출력</p>
|
||||
<span class="refer">useFuncBtn 옵션활용</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/useFuncBtn.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<!--
|
||||
미사용
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="ta_l">
|
||||
<p>커스텀테이블을 이용한 선택파일 다운로드</p>
|
||||
<span class="refer"></span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/downloadSelectedFileCustomTable.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="ta_l">
|
||||
<p>커스텀테이블을 이용한 업로드 폴더 구조 나타내기</p>
|
||||
<span class="refer">설명부분</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/uploadFolderCustomTable.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="ta_l">
|
||||
<p>색상 변경 샘플</p>
|
||||
<span class="refer">페이지 컨셉에 맞는 색상으로 변경 (커스텀)</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/upload.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
-->
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="notice notice-pdf">
|
||||
<p><img src="./gnexam/img/pdf.png">이노릭스 참고 문서</p>
|
||||
<span><a href="../INNORIX Platform WP v9.2 Manual.pdf" target="_blank">INNORIX Platform WP v9.2 Manual.pdf</a></span>
|
||||
<span><a href="../이노릭스 에이전트 오동작 조치 매뉴얼.pdf" target="_blank">이노릭스 에이전트 오동작 조치 매뉴얼.pdf</a></span>
|
||||
<span><a href="../INNORIX Platform WP v9.2 Manual(KR).pdf" target="_blank">INNORIX Platform WP v9.2 Manual.pdf</a></span>
|
||||
<span><a href="../이노릭스 에이전트 증상 별 조치 안내 가이드.pdf" target="_blank">이노릭스 에이전트 증상 별 조치 안내 가이드.pdf</a></span>
|
||||
<span><a href="../INNORIX-WP-JSP-빠른설치-R2.pdf" target="_blank">INNORIX-WP-JSP-빠른설치-R2.pdf</a></span>
|
||||
</div>
|
||||
|
||||
|
||||
@ -62,9 +62,9 @@ html, body{min-width: 900px;}
|
||||
.origin-exam a:hover{text-decoration: underline; color: #0f6fb9;}
|
||||
|
||||
/* (공통)목록 table */
|
||||
.list-tb{counter-reset: tr 0;}
|
||||
.list-tb tr td:first-child::before{counter-increment: tr 1; content:counter(tr) '';}
|
||||
.list-tb{width: 100%; table-layout: fixed; border-top: 2px solid #539426; margin: 20px 0 50px; font-size: 15px;}
|
||||
/* .list-tb{counter-reset: tr 0;} */
|
||||
/* .list-tb tr td:first-child::before{counter-increment: tr 1; content:counter(tr) '';} */
|
||||
.list-tb{width: 100%; table-layout: fixed; border-top: 3px solid #539426; margin: 20px 0 50px; font-size: 15px;}
|
||||
.list-tb th, .list-tb td{border-right: 1px solid #cecece; text-align: center; padding:12px 18px; line-height: 24px; vertical-align:middle; background-color: #fff; word-break:break-all;}
|
||||
.list-tb th:last-child, .list-tb td:last-child{border:none;}
|
||||
.list-tb th{background-color: #eff4e5; font-size: 16px; color: #333; font-weight: bold;}
|
||||
@ -74,7 +74,7 @@ html, body{min-width: 900px;}
|
||||
.list-tb td > img{width: 24px; padding: 0 5px; vertical-align: middle;}
|
||||
.list-tb td a:hover{ text-decoration:underline;}
|
||||
.list-tb tr{border-bottom: 1px solid #cecece;}
|
||||
.list-tb tr:last-child{border-bottom: 2px solid #2b3a58;}
|
||||
.list-tb tr:last-child{border-bottom: 2px solid #539426;}
|
||||
|
||||
.refer{color: #999; font-size: 14px;}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
@ -20,10 +20,11 @@
|
||||
retryDelay: 1, // 재전송 간격(sec)
|
||||
maximumErrorCount: 0 // 최대 에러 허용 횟수
|
||||
});
|
||||
|
||||
/*
|
||||
파일 전송 간 오류 발생 시 재전송 시도 횟수 및 간격에 대한 설정을 해줍니다.
|
||||
미설정 시 무제한으로 재전송을 시도하게 됩니다.
|
||||
- 관련 예제 [오류 시 전송 시도 횟수]참고
|
||||
- 관련 예제 [전송 오류 시 전송 간격 및 횟수 설정]참고
|
||||
*/
|
||||
|
||||
control.on('loadComplete', function (p) { // 다운로드 파일 추가
|
||||
@ -51,6 +52,7 @@
|
||||
control.on('downloadError', function (p) {
|
||||
control.closeTransferWindow(); //전송창 바로 닫힘
|
||||
|
||||
alert("파일 다운로드 중 오류가 발생하였습니다.");
|
||||
console.log(p);
|
||||
|
||||
console.log('---- Download Error Event ----');
|
||||
@ -67,7 +69,9 @@
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a href="../gnIndex.html">← 예제 목록</a><br /><br />
|
||||
<a href="../gnIndex.html">← 예제 목록</a><br />
|
||||
<p>* 2번째 / 3번째 파일을 클릭하여 다운로드 시 downloadError 확인 가능합니다. </p>
|
||||
<p>* 1번째 파일 클릭 시 정상 다운로드 </p>
|
||||
<div id="fileControl"></div><br/>
|
||||
<input type="button" value="선택 다운로드" onclick="control.downloadSelectedFiles();"/>
|
||||
<input type="button" value="전체 다운로드" onclick="control.download();"/>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%-- <%@ page import="com.innorix.transfer.InnorixCustomError"%> --%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.innorix.transfer.InnorixCustomError"%>
|
||||
|
||||
<%@ page import="com.innorix.transfer.InnorixDownload" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
@ -32,12 +33,14 @@ if (fileID != null) {
|
||||
}
|
||||
|
||||
if (fileID.equals("2")) {
|
||||
sysFileName = "sample-file.pdf";
|
||||
// sysFileName = "sample-file.pdf";
|
||||
sysFileName = "sample-file.app"; // ※ (오류) 실제 없는 파일
|
||||
orgFileName = "INNORIX WP Brochure.pdf";
|
||||
}
|
||||
|
||||
if (fileID.equals("3")) {
|
||||
sysFileName = "sample-file.pdf";
|
||||
// sysFileName = "sample-file.pdf";
|
||||
sysFileName = "sample-file.app"; // ※ (오류) 실제 없는 파일
|
||||
orgFileName = "INNORIX WP パンフレット.pdf";
|
||||
}
|
||||
}
|
||||
@ -50,8 +53,7 @@ if (fileName != null) {
|
||||
// 파일명 깨짐대응 문자열 인코딩 처리
|
||||
orgFileName = java.net.URLEncoder.encode(orgFileName, "UTF-8").replaceAll("\\+", "%20");
|
||||
|
||||
//File file = new File(filePath + sysFileName);
|
||||
File file = new File("missingFile.txt"); // 예제 구현을 위한 오류 발생 !!!
|
||||
File file = new File(filePath + sysFileName);
|
||||
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setHeader("Accept-Ranges", "bytes");
|
||||
@ -76,8 +78,6 @@ if(szStartOffset != null || szEndOffset != null) { // 컨트롤 다운로드 요
|
||||
contentLength = file.length();
|
||||
}
|
||||
|
||||
// 예제 구현을 위한 오류 발생 !!!
|
||||
// response.setHeader("Content-Length", "" + contentLength);
|
||||
|
||||
byte b[] = new byte[8192];
|
||||
BufferedInputStream input = null;
|
||||
@ -90,12 +90,15 @@ try {
|
||||
input = new BufferedInputStream(new FileInputStream(file));
|
||||
output = new BufferedOutputStream(response.getOutputStream());
|
||||
|
||||
response.setHeader("Content-Length", "" + contentLength);
|
||||
|
||||
int read = 0;
|
||||
|
||||
if (startOffset != 0) {
|
||||
long n = input.skip(startOffset);
|
||||
if (n == -1) read = -1;
|
||||
}
|
||||
|
||||
|
||||
if(contentLength > 0) {
|
||||
while (contentLength > 0) {
|
||||
@ -111,28 +114,47 @@ try {
|
||||
|
||||
output.write(b, 0, read);
|
||||
contentLength = contentLength - read;
|
||||
|
||||
|
||||
System.out.println("========== innorix transfer " + System.currentTimeMillis() + " ==========");
|
||||
System.out.println("fileID \t: " + fileID);
|
||||
System.out.println("sysFilePath \t: " + filePath + sysFileName);
|
||||
System.out.println("orgFileName \t: " + java.net.URLDecoder.decode(orgFileName, "UTF-8"));
|
||||
System.out.println("totalLength \t: " + file.length() );
|
||||
System.out.println("contentLength \t: "+contentLength);
|
||||
System.out.println("startOffset \t: " + startOffset);
|
||||
System.out.println("read \t: "+read);
|
||||
System.out.println("endOffset \t: " + endOffset);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("========== innorix transfer " + System.currentTimeMillis() + " ==========");
|
||||
System.out.println("fileID \t: " + fileID);
|
||||
System.out.println("sysFilePath \t: " + filePath + sysFileName);
|
||||
System.out.println("orgFileName \t: " + java.net.URLDecoder.decode(orgFileName, "UTF-8"));
|
||||
System.out.println("totalLength \t: " + file.length() );
|
||||
System.out.println("startOffset \t: " + startOffset);
|
||||
System.out.println("endOffset \t: " + endOffset);
|
||||
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
/*
|
||||
downloadCustomError
|
||||
에러코드, 에러메시지, 에러타이틀 설정
|
||||
|
||||
customError.set(Error Code, Error Message, Error Title, retry); // 커스텀 에러 설정
|
||||
* Error Code 설정 시 1000번대로 설정하는 것을 권장합니다.
|
||||
* 너무 크거나 너무 작을 경우 다른 코드들과의 충돌로 정상 작동이 되지 않을 수 있습니다.
|
||||
|
||||
customError.run(); // 커스텀 에러 실행
|
||||
*/
|
||||
|
||||
response.setStatus(404);
|
||||
InnorixCustomError customError = new InnorixCustomError(response);
|
||||
customError.set("1004", "Download Error", "File Download Error", false);
|
||||
|
||||
// output이 getOutputStream을 이용하고 있을 시 output을 이용해서 커스텀 에러를 전송
|
||||
if (output != null){
|
||||
output.write(customError.runAction().getBytes("UTF-8"));
|
||||
}else{
|
||||
customError.run();
|
||||
}
|
||||
|
||||
e.printStackTrace();
|
||||
/*
|
||||
downloadCustomError
|
||||
에러코드, 에러메시지 설정
|
||||
서버에서 예외상황 발생 시 response에 2000번대 이상의 커스텀 코드와 에러 메시지를 write 해줍니다.
|
||||
*/
|
||||
response.setStatus(2000); //2000번대 이상 커스텀 에러 코드
|
||||
response.getWriter().write("에러메시지 입니다"); // 에러메시지
|
||||
response.getWriter().flush();
|
||||
response.getWriter().close();
|
||||
} finally {
|
||||
if(output != null) {
|
||||
output.flush();
|
||||
|
||||
@ -5,18 +5,19 @@
|
||||
<script src="../innorix.js"></script>
|
||||
<script>
|
||||
var control = new Object();
|
||||
|
||||
window.onload = function() {
|
||||
// 파일전송 컨트롤 생성
|
||||
control = innorix.create({
|
||||
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
|
||||
installUrl: '../install/install.html', // Agent 설치 페이지
|
||||
agent: true, // true : Agent 설치형 모드 사용, false : HTML5 모드 사용
|
||||
|
||||
downloadIntegrity: true // 다운로드 이중 무결성
|
||||
});
|
||||
|
||||
/*
|
||||
downloadIntegrity (※ Agent 모드 전용 옵션)
|
||||
- 다운로드 간 파일 해시 값을 이용한 이중 무결성 체크
|
||||
- 이중 무결성 로직을 추가하지 않았을 경우에 비해 다운로드 속도가 저하됩니다.
|
||||
*/
|
||||
|
||||
|
||||
@ -5,6 +5,9 @@
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<%
|
||||
out.clear();
|
||||
out = pageContext.pushBody();
|
||||
|
||||
String saveDir = delimiterReplace(request.getRealPath(request.getServletPath()));
|
||||
String filePath = saveDir.substring(0, saveDir.lastIndexOf("/") + 1);
|
||||
|
||||
@ -30,11 +33,12 @@ String orgFileName = new String();
|
||||
|
||||
/*
|
||||
다운로드 이중 무결성 (※ Agent 모드 전용 옵션)
|
||||
_Integity 파라미터를 확인해서 이중 무결성 여부 확인
|
||||
- 이중 무결성 로직을 추가하지 않았을 경우에 비해 다운로드 속도가 저하됩니다.
|
||||
'_Integity' 파라미터를 확인해서 이중 무결성 여부 확인
|
||||
이중 무결성 로직을 추가하지 않았을 경우에 비해 다운로드 속도가 저하됩니다.
|
||||
*/
|
||||
boolean isIntegrity = false;
|
||||
if (szIntegrity != null && szIntegrity.equalsIgnoreCase("true")) {
|
||||
System.out.println("szIntegrity :"+szIntegrity);
|
||||
isIntegrity = true;
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="../innorix.css">
|
||||
@ -27,25 +27,34 @@
|
||||
|
||||
// 업로드
|
||||
function upload() {
|
||||
var fileInfo = control.getAllFiles(); // 모든 파일 정보 출력
|
||||
if (fileInfo.length == 0 ) { // 파일 개수가 0 이면 return
|
||||
var fileInfo = control.getAllFiles(); // 모든 파일 정보 출력
|
||||
if (fileInfo.length == 0 ) { // 파일 개수가 0 이면 return
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
커스텀 포스트 데이터
|
||||
- 파일 전송 시 임의의 데이터를 함께 전송하여 서버에서 처리할 수 있도록 구성
|
||||
- 임의의 데이터는 한 전송 트랙잭션 당 또는 개별 파일마다 추가가 가능
|
||||
|
||||
control.setPostData(postObj); // 트랜잭션 별 postData
|
||||
control.setFilePostDataByIndex(i, postObj); // 파일 별 postData
|
||||
*/
|
||||
|
||||
// 트랜잭션 별 업로드시 함께 전달될 POST Param 추가
|
||||
var postObj1 = new Object(); // postdata 를 전달할 object 객체 생성
|
||||
var paramVal = "Transection";
|
||||
postObj1.transParam1 = paramVal; // 임의의 텍스트 할당
|
||||
postObj1.transParam2 = fileInfo[0].mode; // 전송모드 할당
|
||||
control.setPostData(postObj1); // 트랜잭션 별 postdata로 값 저장
|
||||
var postObj1 = new Object(); // postdata 를 전달할 object 객체 생성
|
||||
var paramVal = "Transaction";
|
||||
postObj1.transParam1 = paramVal; // 임의의 텍스트 할당
|
||||
postObj1.transParam2 = fileInfo[0].mode; // 전송모드 할당
|
||||
control.setPostData(postObj1); // 트랜잭션 별 postdata로 값 저장
|
||||
|
||||
|
||||
// 파일 별 업로드시 함께 전달될 POST Param 추가
|
||||
for (i=0; i<fileInfo.length; i++){
|
||||
var postObj2 = new Object(); //파일별 postdata를 전달할 object 객체 생성
|
||||
postObj2.fileParam1 = fileInfo[i].basePath; // 각 파일 index의 basePath 할당
|
||||
postObj2.fileParam2 = fileInfo[i].printFileName; // 각 파일 index의 printFileName 할당
|
||||
control.setFilePostDataByIndex(i, postObj2); // 파일별 postdata로 값 저장
|
||||
var postObj2 = new Object(); // 파일별 postdata를 전달할 object 객체 생성
|
||||
postObj2.fileParam1 = fileInfo[i].fileSize; // 각 파일 index의 fileSize 할당
|
||||
postObj2.fileParam2 = fileInfo[i].printFileName; // 각 파일 index의 printFileName 할당
|
||||
control.setFilePostDataByIndex(i, postObj2); // 파일별 postdata로 값 저장
|
||||
}
|
||||
|
||||
control.upload(); // 파일 업로드 시작
|
||||
@ -59,5 +68,7 @@
|
||||
|
||||
<input type="button" value="파일추가" onclick="control.openFileDialog();"/>
|
||||
<input type="button" value="업로드" onclick="upload();"/>
|
||||
<input type="button" value="업로드2" onclick="control.upload();"/>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -40,8 +40,8 @@ if ("POST".equals(request.getMethod()))
|
||||
if("attachFileCompleted".equals(_action)) {
|
||||
System.out.println("========== innorix transfer " + System.currentTimeMillis() + " ==========");
|
||||
System.out.println("_action \t = " + _action);
|
||||
System.out.println("트랜잭션별 transParam1 : " + transParam1 + ", transParam2 : " + transParam2);
|
||||
System.out.println("파일별 fileParam1 : " + fileParam1 + ", fileParam2 : " + fileParam2);
|
||||
System.out.println("트랜잭션별 \t transParam1 : " + transParam1 + ", transParam2 : " + transParam2);
|
||||
System.out.println("파일별 \t fileParam1 : " + fileParam1 + ", fileParam2 : " + fileParam2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="stylesheet" href="../innorix.css">
|
||||
<script src="../innorix.js"></script>
|
||||
<script>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="stylesheet" href="../innorix.css">
|
||||
<script src="../innorix.js"></script>
|
||||
<script>
|
||||
@ -12,6 +13,12 @@
|
||||
transferMode: 'both', // 업로드, 다운로드 혼합사용
|
||||
installUrl: '../install/install.html', // Agent 설치 페이지
|
||||
uploadUrl: './upload.jsp', // 업로드 URL
|
||||
agent: true, // true : Agent 설치형 모드 사용, false : HTML5 모드 사용
|
||||
|
||||
width: 450, // 컨트롤 너비 지정
|
||||
height: 80, // 컨트롤 높이 지정
|
||||
showSelectBox : false, // 선택박스 출력
|
||||
showFuncBtn : ["remove"], // 이동, 삭제 버튼 출력
|
||||
|
||||
skin : 'compact',
|
||||
showTransferFileStatus : true // 리스트 전송창 모드에서 파일별 전송상태 출력
|
||||
|
||||
@ -35,21 +35,17 @@ if ("POST".equals(request.getMethod()))
|
||||
|
||||
// 개별파일 업로드 완료
|
||||
if("attachFileCompleted".equals(_action)) {
|
||||
|
||||
System.out.println("========== uploader.isUploadDone() " + System.currentTimeMillis() + " ==========");
|
||||
System.out.println("_orig_filename \t = " + _orig_filename);
|
||||
/*
|
||||
System.out.println("_new_filename \t = " + _new_filename);
|
||||
System.out.println("_filesize \t = " + _filesize);
|
||||
System.out.println("_filepath \t = " + _filepath);
|
||||
System.out.println("_el \t = " + _el);
|
||||
*/
|
||||
}
|
||||
|
||||
System.out.println("========== innorix transfer " + System.currentTimeMillis() + " ==========");
|
||||
System.out.println("_action \t = " + _action);
|
||||
System.out.println("_run_retval \t = " + _run_retval);
|
||||
/* System.out.println("_orig_filename \t = " + _orig_filename);
|
||||
System.out.println("_orig_filename \t = " + _orig_filename);
|
||||
System.out.println("_new_filename \t = " + _new_filename);
|
||||
System.out.println("_filesize \t = " + _filesize);
|
||||
System.out.println("_start_offset \t = " + _start_offset);
|
||||
@ -57,7 +53,7 @@ if ("POST".equals(request.getMethod()))
|
||||
System.out.println("_filepath \t = " + _filepath);
|
||||
System.out.println("_el \t = " + _el);
|
||||
System.out.println("_type \t = " + _type);
|
||||
System.out.println("_part \t = " + _part); */
|
||||
System.out.println("_part \t = " + _part);
|
||||
}
|
||||
|
||||
// CORS 관련 헤더 추가
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="../innorix.css">
|
||||
@ -12,13 +12,22 @@
|
||||
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
|
||||
transferMode: 'both', // 업로드, 다운로드 혼합사용
|
||||
installUrl: '../install/install.html', // Agent 설치 페이지
|
||||
uploadUrl: './uploadCustomError.jsp' // 업로드 URL
|
||||
uploadUrl: './uploadCustomError.jsp', // 업로드 URL
|
||||
|
||||
retryCount: 1, // 재전송 횟수
|
||||
retryDelay: 1, // 재전송 간격(sec)
|
||||
maximumErrorCount: 0 // 최대 에러 허용 횟수
|
||||
});
|
||||
|
||||
//업로드 에러
|
||||
|
||||
/*
|
||||
파일 전송 간 오류 발생 시 재전송 시도 횟수 및 간격에 대한 설정을 해줍니다.
|
||||
미설정 시 무제한으로 재전송을 시도하게 됩니다.
|
||||
- 관련 예제 [전송 오류 시 전송 간격 및 횟수 설정]참고
|
||||
*/
|
||||
//업로드 에러
|
||||
control.on('uploadError', function (p) {
|
||||
control.transferCancel();
|
||||
control.closeTransferWindow(); // 전송창 닫기
|
||||
control.transferCancel(); //전송 취소
|
||||
control.closeTransferWindow(); // 전송창 닫기
|
||||
|
||||
console.log(p);
|
||||
var f = p.files;
|
||||
@ -30,6 +39,7 @@
|
||||
console.log("errorCode : "+m.errorCode);
|
||||
console.log("id : "+m.id);
|
||||
*/
|
||||
|
||||
for (var i = 0; i < f.length; i++ ) {
|
||||
console.log("-------- 서버 커스텀 에러 --------");
|
||||
console.log("에러코드 : "+f[i].errorCode);
|
||||
@ -62,10 +72,6 @@
|
||||
<body>
|
||||
<a href="../gnIndex.html">← 예제 목록</a><br /><br />
|
||||
|
||||
<form action="./result.jsp" id="f_write" name="f_write" method="post">
|
||||
test1 : <input type="text" name="test1" />
|
||||
</form><br />
|
||||
|
||||
<div id="fileControl"></div><br/>
|
||||
|
||||
<input type="button" value="멀티 파일 추가" onclick="control.openFileDialog();"/>
|
||||
|
||||
@ -31,31 +31,44 @@ if ("POST".equals(request.getMethod()))
|
||||
String _filepath = uploader.getParameter("_filepath"); // 파일 저장경로
|
||||
String _el = uploader.getParameter("el"); // 컨트롤 엘리먼트 ID
|
||||
|
||||
|
||||
|
||||
|
||||
String _run_retval = uploader.run();
|
||||
|
||||
/*
|
||||
getFileInfo 이후 에러발생부터 uploadError이벤트 파라미터에 파일별로 에러메시지가 출력됨
|
||||
커스텀 에러 사용 시 getFileInfo를 사용 권장
|
||||
*/
|
||||
if("getFileInfo".equals(_action)){
|
||||
// ※※ 임의의 에러 발생 ※※
|
||||
if("test".equals("test")){
|
||||
throw new Exception();
|
||||
}
|
||||
System.out.println("_action \t = " + _action);
|
||||
System.out.println("uploader.isUploadDone() \t = " + uploader.isUploadDone());
|
||||
//getFileInfo 이후 에러발생부터 uploadError이벤트 파라미터에 파일별로 에러메시지가 출력됨
|
||||
if(_action.equals("attachFileCompleted")){
|
||||
// ※※ 임의의 에러 발생 ※※ (파일 명이 테스트.txt가 아닐 경우 에러 발생)
|
||||
if(!(_orig_filename.equals("테스트.txt"))){
|
||||
uploader.setCustomValue("11","22");
|
||||
uploader.sendCustomValue();
|
||||
uploader.setCustomError("222", "서버에서에러", "서버에러디테일", false);
|
||||
System.out.println("여기들어오나?");
|
||||
// throw new Exception();
|
||||
}
|
||||
|
||||
|
||||
if(!uploader.isUploadDone()) {
|
||||
System.out.println("_orig_filename \t = " + _orig_filename);
|
||||
throw new Exception("asdasdasd");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
} catch(Exception e){
|
||||
/*
|
||||
|
||||
커스텀 에러 구성
|
||||
InnorixCustomError (※ Agent 모드 전용 옵션)
|
||||
InnorixCustomError.set(Error Code, Error Message, Error Title, retry);
|
||||
InnorixCustomError.set(error Code, error Message, error Title, retry);
|
||||
InnorixCustomError.run();
|
||||
|
||||
- Error Code : 1100번대 번호로 사용 권장 (1100번대 이하는 내부적으로 사용하는 코드로 충돌날 수 있음)
|
||||
*/
|
||||
InnorixCustomError customError = new InnorixCustomError(response);
|
||||
customError.set("1234", "Test Error Tit", "Test Error Content", false); //에러코드, 에러제목, 에러내용, 재전송여부
|
||||
customError.set("12323004", "Test Error Tit", "Test Error Content", false); //에러코드, 에러제목, 에러내용, 재전송여부 (에러 코드는 1000번대사용을 권장합니다.)
|
||||
customError.run();
|
||||
|
||||
e.printStackTrace();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="../innorix.css">
|
||||
@ -36,10 +36,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<a href="../gnIndex.html">← 예제 목록</a><br /><br />
|
||||
|
||||
<form action="./result.jsp" id="f_write" name="f_write" method="post">
|
||||
test1 : <input type="text" name="test1" />
|
||||
</form><br />
|
||||
|
||||
<div id="fileControl"></div><br/>
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.innorix.transfer.InnorixUpload" %>
|
||||
<%-- <%@page import="com.innorix.transfer.InnorixCustomValue"%> --%>
|
||||
<%@page import="com.innorix.multipartrequest.MultipartRequest"%>
|
||||
<%@page import="java.io.File"%>
|
||||
|
||||
@ -13,6 +12,7 @@ if ("POST".equals(request.getMethod()))
|
||||
int maxPostSize = 2147482624; // bytes
|
||||
|
||||
InnorixUpload uploader = new InnorixUpload(request, response, maxPostSize, directory);
|
||||
|
||||
/*
|
||||
전달되는 _action Param 정보
|
||||
speedCheck : 전송속도 측정
|
||||
@ -37,11 +37,11 @@ if ("POST".equals(request.getMethod()))
|
||||
if("attachFileCompleted".equals(_action)){
|
||||
/*
|
||||
커스텀밸류 구성, 전송
|
||||
uploader.setCustomValue(KEY, VALUE);
|
||||
uploader.sendCustomValue();
|
||||
uploader.setCustomValue(KEY, VALUE); //커스텀 밸류 구성
|
||||
uploader.sendCustomValue(); //커스텀 밸류 전송
|
||||
*/
|
||||
uploader.setCustomValue("customKey", "customValue"); // 클라이언트측으로 key,value값 전달
|
||||
uploader.sendCustomValue();
|
||||
uploader.setCustomValue("customKey", "customValue"); // 클라이언트측으로 전달할 key,value값 설정
|
||||
uploader.sendCustomValue(); // 클라이언트측으로 key, value값 전달
|
||||
}
|
||||
|
||||
System.out.println("========== innorix transfer " + System.currentTimeMillis() + " ==========");
|
||||
|
||||
@ -4,52 +4,50 @@
|
||||
<link rel="stylesheet" href="../innorix.css">
|
||||
<script src="../innorix.js"></script>
|
||||
<script>
|
||||
var control_0 = new Object();
|
||||
var control_1 = new Object();
|
||||
var control_2 = new Object();
|
||||
|
||||
var control = new Object();
|
||||
window.onload = function() {
|
||||
// 파일전송 컨트롤 생성
|
||||
control_0 = innorix.create({
|
||||
el: '#fileControl_0', // 컨트롤 출력 HTML 객체 ID
|
||||
// 파일전송 컨트롤 생성
|
||||
control = innorix.create({
|
||||
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
|
||||
transferMode: 'both', // 업로드, 다운로드 혼합사용
|
||||
installUrl: '../install/install.html', // Agent 설치 페이지
|
||||
uploadUrl: './upload.jsp', // 업로드 URL
|
||||
|
||||
useFuncBtn : 0 // 모든 버튼 출력 | 기본값
|
||||
});
|
||||
// 파일전송 컨트롤 생성
|
||||
control_1 = innorix.create({
|
||||
el: '#fileControl_1', // 컨트롤 출력 HTML 객체 ID
|
||||
transferMode: 'both', // 업로드, 다운로드 혼합사용
|
||||
installUrl: '../install/install.html', // Agent 설치 페이지
|
||||
uploadUrl: './upload.jsp', // 업로드 URL
|
||||
|
||||
useFuncBtn : 1 // 선택 박스만 출력
|
||||
});
|
||||
// 파일전송 컨트롤 생성
|
||||
control_2 = innorix.create({
|
||||
el: '#fileControl_2', // 컨트롤 출력 HTML 객체 ID
|
||||
transferMode: 'both', // 업로드, 다운로드 혼합사용
|
||||
installUrl: '../install/install.html', // Agent 설치 페이지
|
||||
uploadUrl: './upload.jsp', // 업로드 URL
|
||||
|
||||
useFuncBtn : 2 // 이동 및 삭제 버튼과 선택 박스 출력안함
|
||||
showSelectBox : true,
|
||||
showFuncBtn: ["remove", "move"]
|
||||
});
|
||||
|
||||
/*
|
||||
※ 매뉴얼 내에 useFuncBtn는 Boolean 타입으로 명시되어있습니다.
|
||||
※ 매뉴얼 내에 적혀진 useFuncBtn는 showSelectBox / showFuncBtn으로 변경되었습니다.
|
||||
매뉴얼내용이 변경되어 아래 가이드와 같이 적용해주세요.
|
||||
|
||||
컨트롤 리스트 내 파일 아이템 이동, 삭제 기능버튼 출력여부
|
||||
- useFuncBtn : 0 // 모든 버튼 출력 | 기본값
|
||||
- useFuncBtn : 1 // 선택 박스만 출력
|
||||
- useFuncBtn : 2 // 이동 및 삭제 버튼과 선택 박스 출력안함
|
||||
컨트롤 리스트 내 선택박스 출력 여부
|
||||
- showSelectBox : true // 선택박스 출력 | 기본값
|
||||
- showSelectBox : false // 선택박스 미출력
|
||||
* showSelectBox 미 지정시 기본값인 true로 인하여 화면에 선택박스가 출력 됩니다.
|
||||
|
||||
- useFuncBtn : false // 모든 버튼 출력 | 기본값
|
||||
- useFuncBtn : true // 선택 박스만 출력
|
||||
컨트롤 리스트 내 파일 아이템 이동, 삭제 기능버튼 출력여부
|
||||
- showFuncBtn:["remove", "move"] //이동버튼 삭제버튼 모두 출력 || 기본값
|
||||
- showFuncBtn:["remove"] // 삭제버튼만 출력
|
||||
- showFuncBtn:["move"] // 이동버튼만 출력
|
||||
* showSelectBox 미 지정시 기본값인 true로 인하여 화면에 이동버튼 / 삭제버튼이 모두 출력 됩니다.
|
||||
*/
|
||||
|
||||
|
||||
// 업로드 완료 이벤트
|
||||
control.on('uploadComplete', function (p) {
|
||||
|
||||
console.log(p.files);
|
||||
var f = p.files;
|
||||
var r = "Upload complete\n\n";
|
||||
for (var i = 0; i < f.length; i++ ) {
|
||||
r += f[i].controlId + " " + f[i].clientFileName + " " + f[i].fileSize + "\n";
|
||||
}
|
||||
alert(r);
|
||||
|
||||
var files = JSON.stringify(f);
|
||||
var innoJquery = innorix._load("innoJquery");
|
||||
innoJquery('form#f_write').append('<input type="hidden" name="files" id="files" value=\'' + files + '\' />');
|
||||
innoJquery('form#f_write').submit();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
@ -59,23 +57,11 @@
|
||||
<form action="result.jsp" id="f_write" name="f_write" method="post">
|
||||
test1 : <input type="text" name="test1" />
|
||||
</form><br />
|
||||
|
||||
<p>useFuncBtn : 0 (기본값)</p>
|
||||
<div id="fileControl_0"></div><br/>
|
||||
<input type="button" value="멀티 파일 추가" onclick="control_0.openFileDialog();"/>
|
||||
<input type="button" value="업로드" onclick="control_0.upload();"/>
|
||||
<br/><br/>
|
||||
|
||||
<p>useFuncBtn : 1</p>
|
||||
<div id="fileControl_1"></div><br/>
|
||||
<input type="button" value="멀티 파일 추가" onclick="control_1.openFileDialog();"/>
|
||||
<input type="button" value="업로드" onclick="control_1.upload();"/>
|
||||
<br/><br/>
|
||||
|
||||
<p>useFuncBtn : 2</p>
|
||||
<div id="fileControl_2"></div><br/>
|
||||
<input type="button" value="멀티 파일 추가" onclick="control_2.openFileDialog();"/>
|
||||
<input type="button" value="업로드" onclick="control_2.upload();"/>
|
||||
<br/><br/>
|
||||
|
||||
<div id="fileControl"></div><br/>
|
||||
|
||||
<input type="button" value="멀티 파일 추가" onclick="control.openFileDialog();"/>
|
||||
<input type="button" value="단일 파일 추가" onclick="control.openFileDialogSingle();"/>
|
||||
<input type="button" value="업로드" onclick="control.upload();"/>
|
||||
</body>
|
||||
</html>
|
||||
@ -83,9 +83,9 @@ if (szEndOffset != null) {
|
||||
|
||||
long contentLength = 0;
|
||||
|
||||
if(szStartOffset != null || szEndOffset != null) { // 컨트롤 다운로드 요청시
|
||||
if(szStartOffset != null || szEndOffset != null) { // 컨트롤 다운로드 요청 시
|
||||
contentLength = endOffset - startOffset + 1;
|
||||
} else { // html 일반 다운로드 요청시
|
||||
} else { // html 일반 다운로드 요청 시
|
||||
contentLength = file.length();
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
|
||||
<%@ page import="com.innorix.transfer.InnorixUpload" %>
|
||||
<%@ page import="java.io.File" %>
|
||||
<%@ page import="java.io.FileInputStream" %>
|
||||
@ -9,21 +8,18 @@
|
||||
<%@ page import="java.io.PrintWriter" %>
|
||||
<%@ page import="org.json.JSONObject"%>
|
||||
|
||||
|
||||
|
||||
<%
|
||||
String directory = InnorixUpload.getServletAbsolutePath(request);
|
||||
directory = directory.substring(0, directory.lastIndexOf("/") + 1) + "data";
|
||||
|
||||
String strFilePaths = request.getParameter("filePaths"); //ZIP이름 만든거
|
||||
String strZipFileName = request.getParameter("zipFileName"); //서버에 저장된 파일 경로
|
||||
String strFilePaths = request.getParameter("filePaths"); // 서버에 저장된 파일 경로
|
||||
String strZipFileName = request.getParameter("zipFileName"); // ZIP파일 이름(랜덤으로 생성한것)
|
||||
|
||||
System.out.println("========== 압축시작 ==========");
|
||||
if ("POST".equals(request.getMethod()))
|
||||
{
|
||||
if ("POST".equals(request.getMethod())) {
|
||||
|
||||
if (strFilePaths != null) {
|
||||
String[] arrFilePath = strFilePaths.split(","); //파일경로 배열에 담고
|
||||
String[] arrFilePath = strFilePaths.split(","); //파일경로 배열에 담기
|
||||
|
||||
byte[] buf = new byte[1024]; //buf 사이즈 설정
|
||||
|
||||
@ -31,29 +27,26 @@ if ("POST".equals(request.getMethod()))
|
||||
|
||||
// 압축
|
||||
try {
|
||||
//ZIP파일 압축 START
|
||||
// ZIP파일 압축 START
|
||||
output = new ZipOutputStream(new FileOutputStream(directory + "/" + strZipFileName)); // zip 파일 생성
|
||||
//여기 생성한건 틀?만 생성해둔거
|
||||
|
||||
FileInputStream in = null;
|
||||
File file = null;
|
||||
|
||||
for (int i=0; i<arrFilePath.length; i++) { //파일 개수만큼 반복
|
||||
|
||||
FileInputStream in = null;//*
|
||||
try {
|
||||
File file = new File(arrFilePath[i]);//*
|
||||
file = new File(arrFilePath[i]);
|
||||
in = new FileInputStream(file); //압축 파일 대상
|
||||
output.putNextEntry(new ZipEntry(file.getName())); //압축 파일에 저장될 파일명
|
||||
int len;
|
||||
while ((len = in.read(buf)) > 0) { // 압축 대상의 파일(data)을 설정된 사이즈(1024)만큼 읽어 들인다.
|
||||
//in파일을 buf사이즈 만큼 읽어서 len에 넣어라 이게 0보다크면 zip틀만든거에 넣어라
|
||||
output.write(buf, 0, len); //읽은 파일을 ZipOutPutStream에 Write
|
||||
while ((len = in.read(buf)) > 0) { // 압축 대상의 파일(data)을 설정된 사이즈(1024)만큼 읽어 들인다.
|
||||
output.write(buf, 0, len); // 읽은 파일을 ZipOutPutStream에 Write
|
||||
}
|
||||
output.closeEntry();
|
||||
//zip 파일 압축 END
|
||||
// * 작성해둔거 메모리 부하 가비지컬렉션 주소참조
|
||||
// TRY CATCH 이중으로 쓰는 문제 수정해놓기
|
||||
//
|
||||
// ZIP파일 압축 END
|
||||
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if(in != null) {
|
||||
try { in.close(); } catch(Exception e) { }
|
||||
|
||||
@ -28,7 +28,10 @@
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<li>제품 활용 개발자 API 매뉴얼 - <a href="./INNORIX Platform WP v9.2 Manual.pdf">INNORIX-Platform Manual.pdf</a></li>
|
||||
<li>(주)지엔기술 자체샘플 바로가기 - <a href="./gnIndex.html">← 예제 목록</a></li>
|
||||
<br />
|
||||
<br />
|
||||
<li>제품 활용 개발자 API 매뉴얼 - <a href="../INNORIX Platform WP v9.2 Manual(KR).pdf">INNORIX-Platform Manual.pdf</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Expires" content="Mon, 06 Jan 1990 00:00:01 GMT">
|
||||
<meta http-equiv="Expires" content="-1">
|
||||
<meta http-equiv="Pragma" content="no-cache">
|
||||
<meta http-equiv="Pragma" content="no-cache">
|
||||
<meta http-equiv="Cache-Control" content="no-cache">
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
@ -11,13 +11,16 @@
|
||||
<link rel="stylesheet" type="text/css" href="client.css">
|
||||
<script src="../innorix.js"></script>
|
||||
<script>
|
||||
var winInstallFileURL = "./INNORIX-Agent.exe";
|
||||
var macInstallFileURL = "./INNORIX-Agent.pkg";
|
||||
var linuxX64InstallFileURL = "./INNORIX-Agent.bin";
|
||||
var linuxX86InstallFileURL = "./INNORIX-Agent.bin";
|
||||
var winInstallFileURL = "./INNORIX-Agent.exe";
|
||||
var winX86InstallFileURL = "./INNORIX-Agent-x86.exe";
|
||||
var macMchipInstallFileURL = "./INNORIX-Agent.pkg";
|
||||
var macIntelInstallFileURL = "./INNORIX-Agent-Intel.pkg";
|
||||
var linux18InstallFileURL = "./INNORIX-Agent-18.04.deb";
|
||||
var linux20InstallFileURL = "./INNORIX-Agent-20.04.deb";
|
||||
var linux22InstallFileURL = "./INNORIX-Agent-22.04.deb";
|
||||
|
||||
var innoJquery = innorix._load("innoJquery");
|
||||
var browserOf = navigator.userAgent.toLowerCase();
|
||||
var innoJquery = innorix._load("innoJquery");
|
||||
var browserOf = navigator.userAgent.toLowerCase();
|
||||
|
||||
innoJquery(window).load(function () {
|
||||
if (browserOf.indexOf("chrome") != -1 && browserOf.indexOf("opr") === -1 && browserOf.indexOf("edge") === -1) {
|
||||
@ -61,15 +64,27 @@
|
||||
}
|
||||
|
||||
if (navigator.platform == "Win32") {
|
||||
location.href = winInstallFileURL;
|
||||
location.href = winX86InstallFileURL;
|
||||
} else if (navigator.platform == "Win64") {
|
||||
location.href = winInstallFileURL;
|
||||
} else if (navigator.platform == "Linux x86_64") {
|
||||
location.href = linuxX64InstallFileURL;
|
||||
} else if (navigator.platform == "Linux i686") {
|
||||
location.href = linuxX86InstallFileURL;
|
||||
} else {
|
||||
location.href = macInstallFileURL;
|
||||
} else if (navigator.platform == "Linux x86_64" || navigator.platform == "Linux i686") {
|
||||
var installURLs = [linux18InstallFileURL,linux20InstallFileURL,linux22InstallFileURL]
|
||||
for (var i = 0; i < installURLs.length; i++) {
|
||||
(function(index) {
|
||||
setTimeout(function() {
|
||||
location.href = installURLs[index];
|
||||
}, 300 * index);
|
||||
})(i);
|
||||
}
|
||||
} else if (navigator.platform == "MacIntel"){
|
||||
var installURLs = [macMchipInstallFileURL , macIntelInstallFileURL]
|
||||
for (var i = 0; i < installURLs.length; i++) {
|
||||
(function(index) {
|
||||
setTimeout(function() {
|
||||
location.href = installURLs[index];
|
||||
}, 300 * index);
|
||||
})(i);
|
||||
}
|
||||
}
|
||||
checkLoop();
|
||||
}, 3000);
|
||||
|
||||
@ -1 +0,0 @@
|
||||
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../innorix.css">
<script src="../innorix.js"></script>
<script>
var control = new Object();
window.onload = function() {
// 파일전송 컨트롤 생성
control = innorix.create({
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
transferMode: 'both', // 업로드, 다운로드 혼합사용
agent: false, // true = Agent 설치, false = html5 모드 사용
installUrl: '../install/install.html', // Agent 설치 페이지
uploadUrl: './upload.jsp' // 업로드 URL
});
// 업로드 완료 이벤트
control.on('uploadComplete', function (p) {
alert("업로드가 완료 되었습니다.\n다운로드 가능하게 재구성 합니다.");
var urlBase = location.href.substring(0, location.href.lastIndexOf("/") + 1);
var fileArray = new Array();
var f = p.files;
for (var i = 0; i < f.length; i++ ) {
var fileObj = new Object();
fileObj.printFileName = f[i].clientFileName;
fileObj.fileSize = f[i].fileSize;
fileObj.downloadUrl = urlBase + "download.jsp?fileName=" + f[i].serverFileName;
fileArray.push(fileObj);
}
control.removeAllFiles(); // 파일을 삭제
control.presetDownloadFiles(fileArray); // 다운로드 목록을 구성
});
};
</script>
</head>
<body>
<a href="../index.html">← 예제 목록</a><br /><br />
<div id="fileControl"></div><br/>
<input type="button" value="파일추가" onclick="control.openFileDialog();"/>
<input type="button" value="업로드" onclick="control.upload();"/> |
<input type="button" value="선택파일 다운로드" onclick="control.downloadSelectedFiles();"/>
<input type="button" value="전체 다운로드" onclick="control.download();"/>
</body>
</html>
|
||||
@ -1,320 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=yes">
|
||||
<meta name="author" content="(주)지엔기술">
|
||||
<title>GNIT 이노릭스 샘플 목록</title>
|
||||
<link rel="shortcut icon" href="./gnexam/img/favicon.ico" />
|
||||
<link rel="stylesheet" href="./gnexam/css/gnit.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header id="header">
|
||||
<h1><img src="./gnexam/img/gnlogo.png">INNORIX SAMPLE LIST</h1>
|
||||
</header>
|
||||
|
||||
<div class="section">
|
||||
<div class="cont-wrap">
|
||||
<div class="notice-wrap">
|
||||
<table class="notice-tb">
|
||||
<colgroup>
|
||||
<col style="width:50%">
|
||||
<col style="width:50%">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th colspan="2" class="notice-txt"><p>이노릭스는 사용하고 계시는 모드별로 제공되는 기능이 다릅니다. 샘플 비고란을 참고해주세요.</p></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="notice notice-a">
|
||||
<p><img src="./gnexam/img/agent.png"> Agent 모드 </p>
|
||||
<span>사용자 PC에 exe파일로 설치되며, 제공되는 기능이 더 많습니다. (agent : true)</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="notice notice-h">
|
||||
<p><img src="./gnexam/img/html5.png"> Html5 모드 </p>
|
||||
<span>무설치형으로 파일전송을 이용하며, 제약되는 기능이 있습니다. (agent : false)</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p class="origin-exam"><a href="./index.html">이노릭스제공 기본예제로 이동</a></p>
|
||||
<div class="table-wrap">
|
||||
<table class="list-tb">
|
||||
<colgroup>
|
||||
<col style="width:60px">
|
||||
<col style="width:auto">
|
||||
<col style="width:15%">
|
||||
<col style="width:15%">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>기능설명</th>
|
||||
<th>샘플</th>
|
||||
<th>비고</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>01</td>
|
||||
<td class="ta_l">
|
||||
<p>업로드 파일 첨부 시 정책 설정</p>
|
||||
<span class="refer">전체 파일개수, 첨부할 확장자제한/허용, 개별파일 사이즈, 전체파일 사이즈, 중복파일 첨부여부 등을 제어</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/setAddFilePolicy.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>02</td>
|
||||
<td class="ta_l">
|
||||
<p>전송 오류 시 전송 간격 및 횟수 설정</p>
|
||||
<span class="refer">retryCount, retryDelay, maximumErrorCount 옵션 사용방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/setErrorRetry.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>03</td>
|
||||
<td class="ta_l">
|
||||
<p>(클라이언트→서버) 업로드 시 추가 데이터 전송</p>
|
||||
<span class="refer">setPostData, setFilePostDataByIndex를 이용하여 클라이언트단에서 서버단으로 추가 데이터 전송</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/postData.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>04</td>
|
||||
<td class="ta_l">
|
||||
<p>(서버→클라이언트) 업로드 시 커스텀 벨류 전송</p>
|
||||
<span class="refer">setCustomValue를 이용하여 서버단에서 클라이언트단으로 커스텀 벨류 전송</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/uploadCustomValue.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>05</td>
|
||||
<td class="ta_l">
|
||||
<p>업로드 시 경로 설정 및 저장 파일명 변경</p>
|
||||
<span class="refer">업로드되는 서버의 경로 설정 및 저장 파일명 변경 방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/uploadServerDirChangeName.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>06</td>
|
||||
<td class="ta_l">
|
||||
<p>(서버→클라이언트) 업로드 시 커스텀 에러 전송</p>
|
||||
<span class="refer">업로드 시 서버측 에러메세지 및 에러코드를 클라이언트측으로 반환</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/uploadCustomError.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>07</td>
|
||||
<td class="ta_l">
|
||||
<p>(서버→클라이언트) 다운로드 시 커스텀 에러 전송</p>
|
||||
<span class="refer">다운로드 중 서버측 에러메세지 및 에러코드를 클라이언트측으로 반환</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/downloadCustomError.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>08</td>
|
||||
<td class="ta_l">
|
||||
<p>다운로드 완료 시 처리방법 예제</p>
|
||||
<span class="refer">다운로드가 완료된 후, 후처리가 필요할 때 처리방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/downloadCompleted.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>09</td>
|
||||
<td class="ta_l">
|
||||
<p>폴더구조 첨부 제한, 서버에 폴더구조 업로드 제어</p>
|
||||
<span class="refer">폴더 구조 첨부를 제한하고, 폴더 구조 업로드를 제한할 때 처리방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/folderIntact.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td class="ta_l">
|
||||
<p>컨트롤 UI의 폴더 트리구조 관련 옵션 사용 예제</p>
|
||||
<span class="refer">폴더구조를 첨부할 때 보여지는 트리구조 제어(showFolderItems, showFolderItemsTree 사용방법)</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/setFolderTreeItems.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>11</td>
|
||||
<td class="ta_l">
|
||||
<p>폴더구조의 파일로 다운로드 구성 예제</p>
|
||||
<span class="refer">폴더구조의 파일로 다운로드 목록을 구성(presetDownloadFiles)하는 방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/folderDownload.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>12</td>
|
||||
<td class="ta_l">
|
||||
<p>폴더구조 파일 combine예제</p>
|
||||
<span class="refer">폴더구조의 파일을 업로드하고, 업로드한 파일로 다운로드 목록이 구성되게 하는 예제</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/folderCombine.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>13</td>
|
||||
<td class="ta_l">
|
||||
<p>사용자가 다운로드 경로 지정, 다운로드 완료 후 탐색기열기</p>
|
||||
<span class="refer">사용자가 다운로드될 경로를 지정할 수 있고, 다운로드 완료 후 탐색기를 열어줄 수 있는 예제</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/setDownloadPath.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>14</td>
|
||||
<td class="ta_l">
|
||||
<p>전송 조각 사이즈변경, 세션 개수 설정</p>
|
||||
<span class="refer">기본 조각 사이즈 2MB, 세션 16개가 적용되어있고 이를 수정가능</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/setSliceSizeSessionCount.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>15</td>
|
||||
<td class="ta_l">
|
||||
<p>컨트롤 파일목록의 선택, 이동, 삭제 아이콘 제어</p>
|
||||
<span class="refer">컨트롤에 첨부된 파일목록의 기능 아이콘을 제어하는 showSelectBox, showFuncBtn 옵션 사용방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/setFuncBtn.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>16</td>
|
||||
<td class="ta_l">
|
||||
<p>출력 메세지 언어 전환(한/영)</p>
|
||||
<span class="refer">출력되는 메세지는 기본 영문으로, 이를 한글로 설정하는 방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/setLanguage.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>17</td>
|
||||
<td class="ta_l">
|
||||
<p>컨트롤 옵션 동적 설정 예제</p>
|
||||
<span class="refer">컨트롤 옵션을 setOption을 통해 설정하는 방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/setOption.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>18</td>
|
||||
<td class="ta_l">
|
||||
<p>컨트롤 동적 생성 예제</p>
|
||||
<span class="refer">동적으로 컨트롤을 생성하고 제어하는 방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/dynamicCreate.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>19</td>
|
||||
<td class="ta_l">
|
||||
<p>Html5모드 다운로드 요청 간격 설정</p>
|
||||
<span class="refer">Html5모드에서 다운로드 시 downloadDelay옵션을 이용한 다운로드 딜레이 설정 방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/setDownloadDelay.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/html5.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>20</td>
|
||||
<td class="ta_l">
|
||||
<p>업로드 완료 시 클라이언트단에 서버경로 숨김처리</p>
|
||||
<span class="refer">setHideServerPathInfo 메소드를 이용해 업로드 간 메타정보 상 노출되는 서버 경로를 숨기기 위한 방법</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/setHideServerPathInfo.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>21</td>
|
||||
<td class="ta_l">
|
||||
<p>첨부파일 압축 업로드 및 압축해제 다운로드 예제</p>
|
||||
<span class="refer">isCompress 메소드를 이용해 업로드시 서버에 압축하여 저장 및, setAutoDecompress이용하여 다운시 자동 압축해제</span>
|
||||
</td>
|
||||
<td><a class="exam-link" href="./gnexam/compressCombine.html">샘플보기</a></td>
|
||||
<td>
|
||||
<img src="./gnexam/img/agent.png">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="notice notice-pdf">
|
||||
<p><img src="./gnexam/img/pdf.png">이노릭스 참고 문서</p>
|
||||
<span><a href="../INNORIX Platform WP v9.2 Manual(KR).pdf" target="_blank">INNORIX Platform WP v9.2 Manual.pdf</a></span>
|
||||
<span><a href="../이노릭스 에이전트 증상 별 조치 안내 가이드.pdf" target="_blank">이노릭스 에이전트 증상 별 조치 안내 가이드.pdf</a></span>
|
||||
<span><a href="../INNORIX-WP-JSP-빠른설치-R2.pdf" target="_blank">INNORIX-WP-JSP-빠른설치-R2.pdf</a></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div><!-- //.section -->
|
||||
|
||||
<footer id="footer">
|
||||
<p>추가 문의사항은 <em>innorix@gnit.co.kr</em>로 보내주시길 바랍니다.</p>
|
||||
<span class="top_btn" onclick="window.scrollTo(0,0);">TOP</span>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -1,67 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="../innorix.css">
|
||||
<script src="../innorix.js"></script>
|
||||
<script>
|
||||
var control = new Object();
|
||||
window.onload = function() {
|
||||
// 파일전송 컨트롤 생성
|
||||
control = innorix.create({
|
||||
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
|
||||
transferMode: 'both', // 업로드, 다운로드 혼합사용
|
||||
installUrl: '../install/install.html', // Agent 설치 페이지
|
||||
uploadUrl: './upload.jsp', // 업로드 URL
|
||||
showSelectBox : true,
|
||||
showFuncBtn: ["remove", "move"]
|
||||
});
|
||||
|
||||
/*
|
||||
※ 매뉴얼 내에 적혀진 useFuncBtn는 showSelectBox / showFuncBtn으로 변경되었습니다.
|
||||
매뉴얼내용이 변경되어 아래 가이드와 같이 적용해주세요.
|
||||
|
||||
컨트롤 리스트 내 선택박스 출력 여부
|
||||
- showSelectBox : true // 선택박스 출력 | 기본값
|
||||
- showSelectBox : false // 선택박스 미출력
|
||||
* showSelectBox 미 지정시 기본값인 true로 인하여 화면에 선택박스가 출력 됩니다.
|
||||
|
||||
컨트롤 리스트 내 파일 아이템 이동, 삭제 기능버튼 출력여부
|
||||
- showFuncBtn:["remove", "move"] //이동버튼 삭제버튼 모두 출력 || 기본값
|
||||
- showFuncBtn:["remove"] // 삭제버튼만 출력
|
||||
- showFuncBtn:["move"] // 이동버튼만 출력
|
||||
* showSelectBox 미 지정시 기본값인 true로 인하여 화면에 이동버튼 / 삭제버튼이 모두 출력 됩니다.
|
||||
*/
|
||||
|
||||
// 업로드 완료 이벤트
|
||||
control.on('uploadComplete', function (p) {
|
||||
|
||||
console.log(p.files);
|
||||
var f = p.files;
|
||||
var r = "Upload complete\n\n";
|
||||
for (var i = 0; i < f.length; i++ ) {
|
||||
r += f[i].controlId + " " + f[i].clientFileName + " " + f[i].fileSize + "\n";
|
||||
}
|
||||
alert(r);
|
||||
|
||||
var files = JSON.stringify(f);
|
||||
var innoJquery = innorix._load("innoJquery");
|
||||
innoJquery('form#f_write').append('<input type="hidden" name="files" id="files" value=\'' + files + '\' />');
|
||||
innoJquery('form#f_write').submit();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a href="../gnIndex.html">← 예제 목록</a><br /><br />
|
||||
|
||||
<form action="result.jsp" id="f_write" name="f_write" method="post">
|
||||
test1 : <input type="text" name="test1" />
|
||||
</form><br />
|
||||
|
||||
<div id="fileControl"></div><br/>
|
||||
|
||||
<input type="button" value="멀티 파일 추가" onclick="control.openFileDialog();"/>
|
||||
<input type="button" value="단일 파일 추가" onclick="control.openFileDialogSingle();"/>
|
||||
<input type="button" value="업로드" onclick="control.upload();"/>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@ -15,9 +15,10 @@
|
||||
|
||||
control.on('loadComplete', function (p) { // 다운로드 파일 추가
|
||||
var urlBase = location.href.substring(0, location.href.lastIndexOf("/") + 1);
|
||||
console.log('urlBase :', urlBase);
|
||||
control.presetDownloadFiles(
|
||||
[{
|
||||
printFileName: "INNORIX WP 브로셔.pdf",
|
||||
printFileName: "INNORIX WP 브로셔!!!.pdf",
|
||||
fileSize: 1433885,
|
||||
downloadUrl: urlBase + "download.jsp?fileID=1"
|
||||
},
|
||||
@ -3,9 +3,6 @@
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
<%
|
||||
out.clear();
|
||||
out = pageContext.pushBody();
|
||||
|
||||
String saveDir = delimiterReplace(request.getRealPath(request.getServletPath()));
|
||||
String filePath = saveDir.substring(0, saveDir.lastIndexOf("/") + 1);
|
||||
|
||||
@ -17,6 +14,8 @@ String filePath = saveDir.substring(0, saveDir.lastIndexOf("/") + 1);
|
||||
유닉스 - /storage/path1/path2/data
|
||||
*/
|
||||
|
||||
// filePath = request.getParameter("innoDirPath");
|
||||
filePath = "D:/usr/local/tomcat/file/sht/";
|
||||
// downloadType : "stream" 설정시 자동 전달되는 GET Param 값
|
||||
String szStartOffset = request.getParameter("_StartOffset");
|
||||
String szEndOffset = request.getParameter("_EndOffset");
|
||||
@ -26,7 +25,6 @@ String fileID = request.getParameter("fileID");
|
||||
String fileName = request.getParameter("fileName");
|
||||
String sysFileName = new String();
|
||||
String orgFileName = new String();
|
||||
String htmlMode = request.getParameter("_Html5");
|
||||
|
||||
if (fileID != null) {
|
||||
if (fileID.equals("1")) {
|
||||
@ -46,8 +44,10 @@ if (fileID != null) {
|
||||
}
|
||||
|
||||
if (fileName != null) {
|
||||
sysFileName = "data/" + fileName;
|
||||
orgFileName = fileName;
|
||||
sysFileName = "" + fileName;
|
||||
sysFileName = "" + fileName;
|
||||
// orgFileName = "data/" + fileName;
|
||||
// orgFileName = "data/" + fileName;
|
||||
}
|
||||
|
||||
// 파일명 깨짐대응 문자열 인코딩 처리
|
||||
File diff suppressed because one or more lines are too long
1
src/main/webapp/innorix_asis/exam/html5Combine.html
Normal file
1
src/main/webapp/innorix_asis/exam/html5Combine.html
Normal file
@ -0,0 +1 @@
|
||||
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../innorix.css">
<script src="../innorix.js"></script>
<script>
var control = new Object();
window.onload = function() {
// 파일전송 컨트롤 생성
control = innorix.create({
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
transferMode: 'both', // 업로드, 다운로드 혼합사용
agent: false, // true = Agent 설치, false = html5 모드 사용
installUrl: '../install/install.html', // Agent 설치 페이지
uploadUrl: './upload.jsp', // 업로드 URL
// width : 550, // 컨트롤 출력 너비(pixel)
height : 100 // 컨트롤 출력 높이(pixel)
});
// 업로드 완료 이벤트
control.on('uploadComplete', function (p) {
alert("업로드가 완료 되었습니다.\n다운로드 가능하게 재구성 합니다.");
var urlBase = location.href.substring(0, location.href.lastIndexOf("/") + 1);
var fileArray = new Array();
var f = p.files;
for (var i = 0; i < f.length; i++ ) {
var fileObj = new Object();
fileObj.printFileName = f[i].clientFileName;
fileObj.fileSize = f[i].fileSize;
fileObj.downloadUrl = urlBase + "download.jsp?fileName=" + f[i].serverFileName;
fileArray.push(fileObj);
}
control.removeAllFiles(); // 파일을 삭제
control.presetDownloadFiles(fileArray); // 다운로드 목록을 구성
});
};
</script>
</head>
<body>
<!-- <a href="../index.html">← 예제 목록</a><br /><br /> -->
<div id="fileControl"></div><br/>
<input type="button" value="파일추가" onclick="control.openFileDialog();"/>
<input type="button" value="업로드" class="uploadBtn" onclick="control.upload();"/> |
<input type="button" value="선택파일 다운로드" onclick="control.downloadSelectedFiles();"/>
<input type="button" value="전체 다운로드" onclick="control.download();"/>
</body>
</html>
|
||||
@ -16,6 +16,7 @@
|
||||
|
||||
control.on('loadComplete', function (p) { // 다운로드 파일 추가
|
||||
var urlBase = location.href.substring(0, location.href.lastIndexOf("/") + 1);
|
||||
console.log('urlBase :: ', urlBase);
|
||||
control.presetDownloadFiles(
|
||||
[{
|
||||
printFileName: "INNORIX WP 브로셔.pdf",
|
||||
@ -27,7 +27,7 @@
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a href="../index.html">← 예제 목록</a><br /><br />
|
||||
<!-- <a href="../index.html">← 예제 목록</a><br /><br /> -->
|
||||
|
||||
<div id="fileControl"></div><br/>
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="../innorix.css">
|
||||
<script src="../innorix.js"></script>
|
||||
<!-- <link rel="stylesheet" href="../innorix.css"> -->
|
||||
<link rel="stylesheet" href="/innorix/innorix.css">
|
||||
<!-- <script src="../innorix.js"></script> -->
|
||||
<script src="/innorix/innorix_dev.js"></script>
|
||||
<script>
|
||||
var control = new Object();
|
||||
window.onload = function() {
|
||||
@ -10,8 +12,9 @@
|
||||
control = innorix.create({
|
||||
el: '#fileControl', // 컨트롤 출력 HTML 객체 ID
|
||||
transferMode: 'both', // 업로드, 다운로드 혼합사용
|
||||
installUrl: '../install/install.html', // Agent 설치 페이지
|
||||
uploadUrl: './upload.jsp' // 업로드 URL
|
||||
installUrl: '/innorix/install/install.html', // Agent 설치 페이지
|
||||
uploadUrl: '/innorix/exam/upload.jsp' // 업로드 URL
|
||||
/* uploadUrl: '/innorix/exam/upload_test_220916.jsp' // 업로드 URL */
|
||||
});
|
||||
|
||||
// 업로드 완료 이벤트
|
||||
@ -28,7 +31,7 @@
|
||||
var files = JSON.stringify(f);
|
||||
var innoJquery = innorix._load("innoJquery");
|
||||
innoJquery('form#f_write').append('<input type="hidden" name="files" id="files" value=\'' + files + '\' />');
|
||||
innoJquery('form#f_write').submit();
|
||||
// innoJquery('form#f_write').submit();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user