일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Java
- 보안조치
- Tibero
- U-06
- tls1.0
- community server connector
- Intellj
- c##
- JetBrains
- rocky8
- TLS1.1
- u-03
- virtualfile
- TLSv1
- arm64
- Linux
- Oracle
- MacOS
- VisualStudioCode
- nexacro
- rocky8.8
- docker
- r진법
- gnu wget
- vscode
- Chrony
- crownix7
- mac
- generic i/o error
- tlserror
Archives
- Today
- Total
Jit_Log
[Nexacro] Client 단에서 파일 생생 본문
들어가기 전
넥사크로 개발 중 그리드 데이터로 파일을 만들어야 하는 경우가 생겼습니다. 자바로 파일을 서버에 저장하고 다운로드 경로를 배포하는 방향으로 개발을 했으나, 불편하다는 문의에.. 가장 간단한 방법을 사용하게 되었고, 그 방법을 기록하고자 합니다.
개발 환경은 다음과 같습니다.
상용 프레임워크
Framework: Nexacro17
방법
VirtualFile 이라는 컴포넌트를 이용하여 클라이언트 PC에 파일을 생성했습니다.
// 파일 생성
this.VirtualFile.isExist(savePath);
/**
* @description VirtualFile_onsuccess - 파일 관련 메소드
*/
this.VirtualFile_onsuccess = function(obj:nexacro.VirtualFile,e:nexacro.VirtualFileEventInfo)
{
switch(e.reason) {
case 1: // open Succ
this.VirtualFile.write(this.ds_File.getColumn(0, "DATA"));
break;
case 6: // write Succ
alert("파일이 생성되었습니다.");
this.VirtualFile.close();
break;
case 10: // isExist Succ
if (!e.fileisexist) {
this.VirtualFile.createDirectory(savePath, true);
}
break;
case 11: // createDirectory Succ
this.VirtualFile.open(savePath + "\\" + fileName, VirtualFile.openWrite | VirtualFile.openAppend);
break;
default:
break;
}
};
결론
최대한 백단에 개발해서 클라이언트 PC 부하를 줄이는게 좋다고 생각했지만 역시 개발은 UX 중점인 것 같습니다. 좀 더 사용자 입장에서 개발하도록 노력해야겠습니다.