Constructor
new EzFile(form)
Parameters:
| Name | Type | Description |
|---|---|---|
form |
nexacro.Form |
Members
addallowtype :string
- Description:
확장자 화이트리스트 allowtype에 의해 허용된 확장자 이외에 추가로 허용할 확장자의 화이트리스트
확장자 화이트리스트 allowtype에 의해 허용된 확장자 이외에 추가로 허용할 확장자의 화이트리스트
Type:
- string
Example
var types = this.ezFile.addallowtype;
this.ezFile.addallowtype = "txt,log";
addbuttoncssclass :string
- Description:
상단 추가 버튼에 적용할 cssclass
상단 추가 버튼에 적용할 cssclass
Type:
- string
Example
var cssclass = this.ezFile.addbuttoncssclass
this.ezFile.addbuttoncssclass = "ezfileaddbutton";
addbuttonvisible :boolean
- Description:
상단 추가 버튼 표시 여부
상단 추가 버튼 표시 여부
Type:
- boolean
Example
var visible = this.ezFile.addbuttonvisible;
this.ezFile.addbuttonvisible = true;
allowtype :nexacro.EzFile.ALLOW_TYPE
- Description:
업로드 허용할 확장자 목록
업로드 허용할 확장자 목록
Type:
Example
var allowtype = this.ezFile.allowtype;
this.ezFile.allowtype = nexacro.EzFile.ALLOW_TYPE.IMAGE;
autorefresh :boolean
- Description:
저장,삭제 이후 자동 데이터 재조회 여부
저장,삭제 이후 자동 데이터 재조회 여부
Type:
- boolean
Example
var auto = this.ezFile.autorefresh;
this.ezFile.autorefresh = true;
autoupload :boolean
- Description:
임시 업로드 성공시 즉시 데이터 저장 처리 여부 설정
임시 업로드 성공시 즉시 데이터 저장 처리 여부 설정
Type:
- boolean
Example
var auto = this.ezFile.autoupload;
this.ezFile.autoupload = true;
batchsql :string
- Description:
파일 배치처리 호출시 실행할 SQL ID
파일 배치처리 호출시 실행할 SQL ID
Type:
- string
Example
var sql = this.ezFile.batchsql;
this.ezFile.batchsql = "@ezFile.sampleBatchTargtSearch";
buttongap :number
- Description:
버튼 사이 간격
버튼 사이 간격
Type:
- number
Example
var gap = this.ezFile.buttongap;
this.ezFile.set_buttongap(5);
buttonheight :number
- Description:
버튼 높이
버튼 높이
Type:
- number
Example
var height = this.ezFile.buttonheight;
this.ezFile.buttonheight = 5;
buttonminwidth :number
- Description:
버튼 최소 넓이
버튼 최소 넓이
Type:
- number
Example
var width = this.ezFile.buttonminwidth;
this.ezFile.set_buttonminwidth(5);
compressionfilename :string
- Description:
다중다운로드시 압축파일 명칭 설정되어 있을 경우 [해당 값].zip 으로 다운로드 됩니다.
다중다운로드시 압축파일 명칭 설정되어 있을 경우 [해당 값].zip 으로 다운로드 됩니다.
Type:
- string
Example
var name = this.ezFile.compressionfilename;
this.ezFile.compressionfilename = "test";
dbaction :string
- Description:
transaction 호출시 사용할 datasource 코드
transaction 호출시 사용할 datasource 코드
Type:
- string
Example
var action = this.ezFile.dbaction;
this.ezFile.dbaction = "basic";
delauthsql :string
- Description:
파일 삭제시 권한 확인을 위해 실행할 SQL ID
- 파일 저장시 전달되며 이후 해당 파일을 삭제할 때 검증에 사용됨
- 파일 삭제시 전달되는 값이 아님에 주의
파일 삭제시 권한 확인을 위해 실행할 SQL ID
- 파일 저장시 전달되며 이후 해당 파일을 삭제할 때 검증에 사용됨
- 파일 삭제시 전달되는 값이 아님에 주의
Type:
- string
Example
var sql = this.ezFile.delauthsql;
this.ezFile.set_delauthsql = "@ezFile.delAuth";
delbuttoncssclass :string
- Description:
상단 삭제 버튼에 적용할 cssclass
상단 삭제 버튼에 적용할 cssclass
Type:
- string
Example
var cssclass = this.ezFile.delbuttoncssclass
this.ezFile.delbuttoncssclass = "ezfiledeletebutton";
delbuttonvisible :boolean
- Description:
상단 삭제 버튼 표시 여부
상단 삭제 버튼 표시 여부
Type:
- boolean
Example
var visible = this.ezFile.delbuttonvisible;
this.ezFile.delbuttonvisible = true;
deletesessionconf :boolean
- Description:
로그인한 사용자만 삭제 가능하게 할지 여부
- 파일 저장시 전달되며 이후 해당 파일을 삭제할 때 검증에 사용됨
- 파일 삭제시 전달되는 값이 아님에 주의
로그인한 사용자만 삭제 가능하게 할지 여부
- 파일 저장시 전달되며 이후 해당 파일을 삭제할 때 검증에 사용됨
- 파일 삭제시 전달되는 값이 아님에 주의
Type:
- boolean
Example
var conf = this.ezFile.deletesessionconf;
this.ezFile.deletesessionconf = true;
deletesql :string
- Description:
파일 삭제처리 호출시 실행할 SQL ID
파일 삭제처리 호출시 실행할 SQL ID
Type:
- string
Example
var sql = this.ezFile.deletesql;
this.ezFile.deletesql = "@ezFile.del";
downauthsql :string
- Description:
파일 다운로드시 권한 확인을 위해 실행할 SQL ID
- 파일 저장시 전달되며 이후 해당 파일을 다운로드할 때 검증에 사용됨
- 파일 다운로드시 전달되는 값이 아님에 주의
파일 다운로드시 권한 확인을 위해 실행할 SQL ID
- 파일 저장시 전달되며 이후 해당 파일을 다운로드할 때 검증에 사용됨
- 파일 다운로드시 전달되는 값이 아님에 주의
Type:
- string
Example
var sql = this.ezFile.downauthsql;
this.ezFile.downauthsql = "@ezFile.downAuth";
downbuttoncssclass :string
- Description:
상단 다운로드 버튼에 적용할 cssclass
상단 다운로드 버튼에 적용할 cssclass
Type:
- string
Example
var cssclass = this.ezFile.downbuttoncssclass
this.ezFile.downbuttoncssclass = "ezfiledownbutton";
downbuttonvisible :boolean
- Description:
상단 다운로드 버튼 표시 여부
상단 다운로드 버튼 표시 여부
Type:
- boolean
Example
var visible = this.ezFile.downbuttonvisible;
this.ezFile.downbuttonvisible = true;
downloadurl :string
- Description:
파일 다운로드시 호출 경로
파일 다운로드시 호출 경로
Type:
- string
Example
var url = this.ezFile.downloadurl;
this.ezFile.downloadurl = "down";
downsessionconf :boolean
- Description:
로그인한 사용자만 다운로드 가능하게 할지 여부
- 파일 저장시 전달되며 이후 해당 파일을 다운로드할 때 검증에 사용됨
- 파일 다운로드시 전달되는 값이 아님에 주의
로그인한 사용자만 다운로드 가능하게 할지 여부
- 파일 저장시 전달되며 이후 해당 파일을 다운로드할 때 검증에 사용됨
- 파일 다운로드시 전달되는 값이 아님에 주의
Type:
- boolean
Example
var conf = this.ezFile.downsessionconf;
this.ezFile.downsessionconf = true;
filedataset :string
- Description:
파일 정보용 Dataset 명칭 데이터셋을 직접 설정할 경우 setFiledataset 함수를 사용하세요 데이터셋을 가져올 경우 getFiledataset 함수를 사용하세요
파일 정보용 Dataset 명칭 데이터셋을 직접 설정할 경우 setFiledataset 함수를 사용하세요 데이터셋을 가져올 경우 getFiledataset 함수를 사용하세요
Type:
- string
Example
var dsNm = this.ezFile.filedataset;
this.ezFile.filedataset = "ds_list";
filemode :"single"|"multi"|"batch"|"singleblob"|"multiblob"|"batchblob"|"downloadonly"
- Description:
파일 모드 EzFile.FILE_MODE 참조
파일 모드 EzFile.FILE_MODE 참조
Type:
- "single" | "multi" | "batch" | "singleblob" | "multiblob" | "batchblob" | "downloadonly"
Example
var mode = this.ezFile.filemode;
this.ezFile.mode = nexacro.EzFile.FILE_MODE.SINGLE;
filetargt :string
- Description:
파일대상구분 주로 테이블 명
파일대상구분 주로 테이블 명
Type:
- string
Example
var target = this.ezFile.filetargt;
this.ezFile.filetargt = "COM00";
gridbuttoncellsize - 그리드 버튼 cell 넓이 :number
Type:
- number
Example
var w = this.ezFile.gridbuttoncellsize;
this.ezFile.gridbuttoncellsize = 10;
gridcheckboxcellsize :number
- Description:
그리드 체크박스 cell 넓이
그리드 체크박스 cell 넓이
Type:
- number
Example
var w = this.ezFile.gridcheckboxcellsize;
this.ezFile.gridcheckboxcellsize = 28;
gridcheckvisible :string
- Description:
파일 목록 Grid에 선택 체크박스 표시 여부
파일 목록 Grid에 선택 체크박스 표시 여부
Type:
- string
Example
var visible = this.ezFile.gridcheckvisible;
this.ezFile.gridcheckvisible = true;
gridcssclass :string
- Description:
파일 목록 Grid에 적용할 cssclass
파일 목록 Grid에 적용할 cssclass
Type:
- string
Example
var cssclass = this.ezFile.gridcssclass;
this.ezFile.gridcssclass = "ezfilegrid";
griddelbtncssclass :string
- Description:
파일 목록 Grid의 삭제버튼 cell에 적용할 cssclass
파일 목록 Grid의 삭제버튼 cell에 적용할 cssclass
Type:
- string
Example
var cssclass = this.ezFile.griddelbtncssclass;
this.ezFile.griddelbtncssclass = "ezfilegriddelbtn";
griddelvisible :boolean
- Description:
파일 목록 Grid에 삭제 버튼 표시 여부
파일 목록 Grid에 삭제 버튼 표시 여부
Type:
- boolean
Example
var visible = this.ezFile.griddelvisible;
this.ezFile.griddelvisible = true;
griddownbtncssclass :string
- Description:
파일 목록 Grid의 다운버튼 cell에 적용할 cssclass
파일 목록 Grid의 다운버튼 cell에 적용할 cssclass
Type:
- string
Example
var cssclass = this.ezFile.griddownbtncssclass;
this.ezFile.griddownbtncssclass = "ezfilegriddownbtn";
gridfilenmcssclass :string
- Description:
파일 목록 Grid의 File명 cell에 적용할 cssclass
파일 목록 Grid의 File명 cell에 적용할 cssclass
Type:
- string
Example
var cssclass = this.ezFile.gridfilenmcssclass;
this.ezFile.gridfilenmcssclass = "ezfilegridfilenm";
gridfilesizecssclass :string
- Description:
파일 목록 Grid의 File Size cell에 적용할 cssclass
파일 목록 Grid의 File Size cell에 적용할 cssclass
Type:
- string
Example
var cssclass = this.ezFile.gridfilesizecssclass;
this.ezFile.gridfilesizecssclass = "ezfilegridfilesize"
gridformattype :"single"|"double"
- Description:
그리드 포맷 유형 EzFile.GRID_TYPE 참조
그리드 포맷 유형 EzFile.GRID_TYPE 참조
Type:
- "single" | "double"
Example
var type = this.ezFile.gridformattype;
this.ezFile.gridformattype = nexacro.EzFile.GRID_TYPE.SINGLE;
gridheadheight :number
- Description:
그리드 header 높이
그리드 header 높이
Type:
- number
Example
var h = this.ezFile.gridheadheight;
this.ezFile.gridheadheight = 21;
gridheadvisible :boolean
- Description:
파일 목록 Grid에 Header 영역 표시 여부
파일 목록 Grid에 Header 영역 표시 여부
Type:
- boolean
Example
var visible = this.ezFile.gridheadvisible;
this.ezFile.gridheadvisible = true;
gridpaddingtop :number
- Description:
그리드 상단 패딩
그리드 상단 패딩
Type:
- number
Example
var top = this.ezFile.gridpaddingtop;
this.ezFile.gridpaddingtop = 20;
gridpreviewbtncssclass :string
- Description:
파일 목록 Grid의 미리보기버튼 cell에 적용할 cssclass
파일 목록 Grid의 미리보기버튼 cell에 적용할 cssclass
Type:
- string
Example
var cssclass = this.ezFile.gridpreviewbtncssclass;
this.ezFile.gridpreviewbtncssclass = "ezfilegridpreviewbtn";
gridtypevisible :boolean
- Description:
파일 목록 Grid에 유형(또는 썸네일) 칼럼 표시 여부
파일 목록 Grid에 유형(또는 썸네일) 칼럼 표시 여부
Type:
- boolean
Example
var visible = this.ezFile.gridtypevisible;
this.ezFile.gridtypevisible = true;
host :string
- Description:
파일 다운로드시 호출할 서버 미입력시 현재 서버
파일 다운로드시 호출할 서버 미입력시 현재 서버
Type:
- string
Example
var url = this.ezFile.host;
this.ezFile.set_host = "http://localhost:8080/";
icontype :string
- Description:
썸네일 아이콘 유형 EzFile.GRID_TYPE 참조
썸네일 아이콘 유형 EzFile.GRID_TYPE 참조
Type:
- string
Example
var type = this.ezFile.icontype;
this.ezFile.icontype = 'v2';
limittype :string
- Description:
파일 업로드시 제한할 확장자 목록(블랙리스트) 여러 값을 입력할 경우 구분자는 ','으로 한다.
파일 업로드시 제한할 확장자 목록(블랙리스트) 여러 값을 입력할 경우 구분자는 ','으로 한다.
Type:
- string
Example
var types = this.ezFile.limittype;
this.ezFile.limittype = "test";
locale :string
- Description:
지역코드
지역코드
Type:
- string
Example
var locale = this.ezFile.locale
this.ezFile.locale = "ko_KR";
maxcount :number
- Description:
최대 업로드 가능한 파일 수
- filemode property의 값이 "single" 또는 "singleblob"일 경우 해당 값은 1로 적용됩니다.
- 음수 입력시 무제한입니다.
최대 업로드 가능한 파일 수
- filemode property의 값이 "single" 또는 "singleblob"일 경우 해당 값은 1로 적용됩니다.
- 음수 입력시 무제한입니다.
Type:
- number
Example
var cnt = this.ezFile.maxcount;
this.ezFile.maxcount = 10;
maxsize :number
- Description:
파일당 업로드 최대 크기(MiB) 설정
- 음수 입력시 무제한(10MiB 이하 권장)
파일당 업로드 최대 크기(MiB) 설정
- 음수 입력시 무제한(10MiB 이하 권장)
Type:
- number
Example
var size = this.ezFile.maxsize;
this.ezFile.maxsize = 10;
notecssclass :string
- Description:
비고 static에 적용할 cssclass
비고 static에 적용할 cssclass
Type:
- string
Example
var cssclass = this.ezFile.notecssclass
this.ezFile.notecssclass ="ezfilenote";
notepaddingtop :number
- Description:
비고영역 상단 패딩
비고영역 상단 패딩
Type:
- number
Example
var top = this.ezFile.notepaddingtop;
this.ezFile.notepaddingtop = 20;
notetext :string
- Description:
비고 영역에 표시할 문자열
비고 영역에 표시할 문자열
Type:
- string
Example
var txt = this.ezFile.notetext;
this.ezFile.set_notetext = "* 10MiB 이하 파일만 업로드 가능합니다.";
padding :string
- Description:
패딩, 넥사크로 padding 문자열 규칙에 따릅니다.
패딩, 넥사크로 padding 문자열 규칙에 따릅니다.
Type:
- string
Example
var pad = this.ezFile.padding;
this.ezFile.padding = "10px 20px 10px 20px";
padding :string
- Description:
섬네일 셀 패딩, 넥사크로 padding 문자열 규칙에 따릅니다.
섬네일 셀 패딩, 넥사크로 padding 문자열 규칙에 따릅니다.
Type:
- string
Example
var pad = this.ezFile.thumbnailpadding;
this.ezFile.thumbnailpadding = "10px 20px 10px 20px";
refreshbuttoncssclass :string
- Description:
상단 갱신 버튼에 적용할 cssclass
상단 갱신 버튼에 적용할 cssclass
Type:
- string
Example
var cssclass = this.ezFile.refreshbuttoncssclass
this.ezFile.refreshbuttoncssclass = "ezfilerefreshbutton";
refreshbuttonvisible :boolean
- Description:
상단 갱신 버튼 표시 여부
상단 갱신 버튼 표시 여부
Type:
- boolean
Example
var visible = this.ezFile.refreshbuttonvisible;
this.ezFile.refreshbuttonvisible = true;
savepath :string
- Description:
savepath 파일 저장 경로
rootPath 하위 해당 경로에 파일이 생성됨
savepath 파일 저장 경로
rootPath 하위 해당 경로에 파일이 생성됨
Type:
- string
Example
var path = this.ezFile.savepath;
this.ezFile.savepath = "files";
savesql :string
- Description:
파일 정보 저장시 호출되는 SQL ID
파일 정보 저장시 호출되는 SQL ID
Type:
- string
Example
var sql = this.ezFile.savesql;
this.ezFile.savesql = "@ezFile.insert";
selectsql :string
- Description:
파일 정보 조회시 호출되는 SQL ID
파일 정보 조회시 호출되는 SQL ID
Type:
- string
Example
var sql = this.ezFile.selectsql;
this.ezFile.selectsql = "@ezFile.search";
skipalert :boolean
- Description:
전/후처리 alert skip여부
전/후처리 alert skip여부
Type:
- boolean
Example
var skipalert = this.ezFile.skipalert;
this.ezFile.skipalert = true;
skippreviewconfirm :boolean
- Description:
미리보기 할때 confirm skip여부
미리보기 할때 confirm skip여부
Type:
- boolean
Example
var skippreviewconfirm = this.ezFile.skippreviewconfirm;
this.ezFile.skippreviewconfirm = true;
thumbnailsize :string
- Description:
파일 목록 Grid의 썸네일 Cell 크기
nexacro Rect 규칙에 따름
파일 목록 Grid의 썸네일 Cell 크기
nexacro Rect 규칙에 따름
Type:
- string
Example
var size = this.ezFile.thumbnailsize;
this.ezFile.thumbnailsize ="60 40";
usethumbnail :boolean
- Description:
파일 목록 Grid의 썸네일 Cell 표시 여부
파일 목록 Grid의 썸네일 Cell 표시 여부
Type:
- boolean
Example
var isUsing = this.ezFile.usethumbnail;
this.ezFile.set_usethumbnail(true);
willrename :boolean
- Description:
파일 업로드시 파일명 난수화 여부
- 서버에 저장될 때 난수화 된 이름으로 저장되고 다운로드시에는 원래의 파일명으로 다운로드 됩니다.
파일 업로드시 파일명 난수화 여부
- 서버에 저장될 때 난수화 된 이름으로 저장되고 다운로드시에는 원래의 파일명으로 다운로드 됩니다.
Type:
- boolean
Example
var willrename = this.ezFile.willrename;
this.ezFile.willrename = true;
(static, readonly) ALLOW_TYPE :string
Properties:
| Name | Type | Description |
|---|---|---|
ALL |
string | "all" 블랙리스트를 제외한 모든 유형의 확장자 허용 |
IMAGE |
string | "image" jpg, png 등 이미지 유형의 확장자 허용 |
EXCEL |
string | "excel" xls, xlsx 등 Excel파일 유형의 확장자 허용 |
DOCUMENT |
string | "document" doc, hwp 등 문서파일 유형의 확장자 허용 |
NONE |
string | "none" 허용하는 확장자 없음(오직 addallowtype에 의해 허용된 값만 처리) |
Type:
- string
(static) CHUNK_SIZE :Object
- Description:
파일 분할 업로드시 크기 단위 (byte)
파일 분할 업로드시 크기 단위 (byte)
Type:
- Object
(static) FILE_ICON :Object
- Description:
아이콘별 확장자
아이콘별 확장자
Type:
- Object
(static, readonly) FILE_MODE :string
Properties:
| Name | Type | Description |
|---|---|---|
SINGLE |
string | |
MULTI |
string | "single" 단일 파일 일반 업로드 |
BATCH |
string | "multi" 다중 파일 일반 업로드 |
SINGLE_BLOB |
string | "batch" 파일 배치처리용 업로드 |
MULTI_BLOB |
string | "singleblob" 단일 파일 바이너리 업로드(DB에 BLOB으로 저장) |
BATCH_BLOB |
string | "multiblob" 다중 파일 바이너리 업로드(DB에 BLOB으로 저장) |
DOWN_ONLY |
string | "batchblob" 파일 배치처리용 업로드(DB에 BLOB으로 저장) |
Type:
- string
(static) FILE_TYPE :Object
- Description:
파일 유형 코드별 확장자
파일 유형 코드별 확장자
Type:
- Object
(static, readonly) GRID_TYPE :string
Properties:
| Name | Type | Description |
|---|---|---|
SINGLE |
string | |
DOUBLE |
string | "single" 단일 행 그리드 |
Type:
- string
(static, readonly) LOG_KEY :string
- Description:
로깅용 키
로깅용 키
Type:
- string
(static, readonly) errPrefix :string
- Description:
파일 처리 에러메시지 상세코드 prefix
파일 처리 에러메시지 상세코드 prefix
Type:
- string
(static) i18nConfig :Object
- Description:
EzFile 내장 다국어 정보 객체
EzFile 내장 다국어 정보 객체
Type:
- Object
(static, readonly) separator :string
- Description:
파일 내부 처리용 구분자
파일 내부 처리용 구분자
Type:
- string
Methods
add() → {Promise}
- Description:
파일 추가 (임시업로드) 다이얼로그 호출
Example
this.ezFile.add();
Returns:
파일 다이얼로그 호출 결과 Promise
- Type
- Promise
customPreview(previewInfos)
- Description:
override 용 파일 미리보기함수, 솔루션에 맞게 커스터마이징을 한다.
Example
this.ezFile.customPreview(previewInfo);
Parameters:
| Name | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
previewInfos |
Array.<Object> | 미리보기정보 목록 Properties
|
del(uuids) → {Promise}
- Description:
파일을 삭제한다.
Example
this.ezFile.del(["xxxxx"]);
Parameters:
| Name | Type | Description |
|---|---|---|
uuids |
Array.<string> | 삭제 처리할 파일의 UUID 목록 |
Returns:
삭제 처리 결과 Promise
- Type
- Promise
deleteCheckedFiles() → {Promise}
- Description:
Grid에서 선택된 파일들을 삭제 처리한다.
- 체크 박스 사용시, 체크박스로 선택된 파일들을 삭제 한다.
- 체크 박시 미사용시, 현재 선택된 행의 파일을 삭제 한다.
Example
this.ezFile.deleteCheckedFiles();
Returns:
삭제 처리 결과 Promise
- Type
- Promise
down(uuids)
- Description:
파일을 다운로드한다.
Example
this.ezFile.down(["xxxxx"]);
Parameters:
| Name | Type | Description |
|---|---|---|
uuids |
Array.<string> | 다운로드 처리할 파일의 UUID 목록 |
downloadCheckedFiles() → {Promise}
- Description:
Grid에서 선택된 파일들을 다운로드 처리한다.
- 체크 박스 사용시, 체크박스로 선택된 파일들을 다운로드한다.
- 체크 박시 미사용시, 현재 선택된 행의 파일을 다운로드 한다.
Example
this.ezFile.downloadCheckedFiles();
Returns:
다운로드 처리 결과 Promise
- Type
- Promise
getFileDataset() → {nexacro.Dataset}
- Description:
설정된 파일 정보용 Dataset을 가져옴
Example
var ds = this.ezFile.getFileDataset();
Returns:
파일 정보용 Dataset
- Type
- nexacro.Dataset
getUploadFileDataset() → {nexacro.Dataset}
- Description:
임시업로드 결과 Dataset을 가져옴
Example
var ds = this.ezFile.getUploadFileDataset();
Returns:
임시업로드 결과 Dataset
- Type
- nexacro.Dataset
preview(uuids)
- Description:
파일을 미리보기한다.
Example
this.ezFile.preview(["xxxxx"]);
Parameters:
| Name | Type | Description |
|---|---|---|
uuids |
Array.<string> | 미리보기 처리할 파일 UUID |
refresh() → {Promise}
- Description:
파일목록을 재조회한다.
Example
this.ezFile.refresh();
Returns:
파일 목록 호출 결과 Promise
- Type
- Promise
save() → {Promise}
- Description:
임시업로드 한 파일들을 실제 저장 처리한다.
Example
this.ezFile.save();
Returns:
저장 처리 결과 Promise
- Type
- Promise
setFiledataset(ds)
- Description:
파일 정보용 Dataset 설정
Example
this.ezFile.setFiledataset(this.ds_list);
Parameters:
| Name | Type | Description |
|---|---|---|
ds |
nexacro.Dataset | 파일 정보용 Dataset |
set_addallowtype(addallowtype)
- Description:
확장자 화이트리스트 설정 allowtype에 의해 허용된 확장자 이외에 추가로 허용할 확장자의 화이트리스트
Example
this.ezFile.set_addallowtype("txt,log");
Parameters:
| Name | Type | Description |
|---|---|---|
addallowtype |
string | 추가로 허용할 확장자의 화이트리스트 |
set_addbuttoncssclass(addbuttoncssclassopt)
- Description:
상단 추가 버튼에 적용할 cssclass 설정
Example
this.ezFile.set_addbuttoncssclass("ezfileaddbutton");
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
addbuttoncssclass |
string |
<optional> |
"ezfileaddbutton"
|
상단 추가 버튼에 적용할 cssclass |
set_addbuttonvisible(addbuttonvisibleopt)
- Description:
상단 추가 버튼 표시 여부 설정
Example
this.ezFile.set_addbuttonvisible(true);
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
addbuttonvisible |
boolean |
<optional> |
true
|
상단 추가 버튼 표시 여부 |
set_allowtype(allowtype)
- Description:
업로드 허용할 확장자 목록 지정
Example
this.ezFile.set_allowtype(nexacro.EzFile.ALLOW_TYPE.IMAGE);
Parameters:
| Name | Type | Description |
|---|---|---|
allowtype |
nexacro.EzFile.ALLOW_TYPE | 업로드 허용할 확장자 목록 |
set_autorefresh(autorefreshopt)
- Description:
저장,삭제 이후 자동 데이터 재조회 여부 설정
Example
this.ezFile.set_autorefresh(true);
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
autorefresh |
boolean |
<optional> |
true
|
저장, 삭제 이후 자동 데이터 재조회 여부 |
set_autoupload(autouploadopt)
- Description:
임시 업로드 성공시 즉시 데이터 저장 처리 여부 설정
Example
this.ezFile.set_autoupload(true);
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
autoupload |
boolean |
<optional> |
true
|
임시 업로드 성공시 즉시 데이터 저장 처리 여부 |
set_batchsql(batchsqlopt)
- Description:
파일 배치처리 호출시 실행할 SQL ID 설정
Example
this.ezFile.set_batchsql("@ezFile.sampleBatchTargtSearch");
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
batchsql |
string |
<optional> |
"@ezFile.sampleBatchTargtSearch"
|
파일 배치처리 호출시 실행할 SQL ID |
set_buttongap(buttongap)
- Description:
버튼 사이 간격 설정
Example
this.ezFile.set_buttongap(5);
Parameters:
| Name | Type | Description |
|---|---|---|
buttongap |
number | 버튼 사이 간격 |
set_buttonminwidth(buttonminwidth)
- Description:
버튼 최소 넓이 설정
Example
this.ezFile.set_buttonminwidth(5);
Parameters:
| Name | Type | Description |
|---|---|---|
buttonminwidth |
number | 버튼 최소 넓이 |
set_compressionfilename(compressionfilename)
- Description:
다중다운로드시 압축파일 명칭 설정
설정되어 있을 경우 [해당 값].zip 으로 다운로드 됩니다.
Example
this.ezFile.set_compressionfilename("test");
Parameters:
| Name | Type | Description |
|---|---|---|
compressionfilename |
string | 다중다운로드시 압축파일 명칭 |
set_dbaction(dbactionopt)
- Description:
transaction 호출시 사용할 datasource 코드 설정
Example
this.ezFile.set_dbaction("basic");
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
dbaction |
string |
<optional> |
"basic"
|
transaction 호출시 사용할 datasource 코드 |
set_delauthsql(delauthsqlopt)
- Description:
파일 삭제시 권한 확인을 위해 실행할 SQL ID 설정
Example
this.ezFile.set_delauthsql("@ezFile.delAuth");
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
delauthsql |
string |
<optional> |
"none"
|
파일 삭제시 권한 확인을 위해 실행할 SQL ID
|
set_delbuttoncssclass(delbuttoncssclassopt)
- Description:
상단 삭제 버튼에 적용할 cssclass 설정
Example
this.ezFile.set_delbuttoncssclass("ezfiledeletebutton");
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
delbuttoncssclass |
string |
<optional> |
"ezfiledeletebutton"
|
상단 삭제 버튼에 적용할 cssclass |
set_delbuttonvisible(delbuttonvisibleopt)
- Description:
상단 삭제 버튼 표시 여부 확인
Example
this.ezFile.set_delbuttonvisible(true);
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
delbuttonvisible |
boolean |
<optional> |
true
|
상단 삭제 버튼 표시 여부 |
set_deletesessionconf(deletesessionconfopt)
- Description:
로그인한 사용자만 삭제 가능하게 할지 여부 설정
Example
this.ezFile.set_deletesessionconf(true);
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
deletesessionconf |
boolean |
<optional> |
true
|
로그인한 사용자만 삭제 가능하게 할지 여부
|
set_deletesql(deletesqlopt)
- Description:
파일 삭제처리 호출시 실행할 SQL ID 설정
Example
var sql = this.ezFile.deletesql;
this.ezFile.set_deletesql("@ezFile.del");
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
deletesql |
string |
<optional> |
"@ezFile.del"
|
파일 삭제처리 호출시 실행할 SQL ID |
set_downauthsql(downauthsqlopt)
- Description:
파일 다운로드시 권한 확인을 위해 실행할 SQL ID 설정
Example
this.ezFile.set_downauthsql("@ezFile.downAuth");
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
downauthsql |
string |
<optional> |
"none"
|
파일 다운로드시 권한 확인을 위해 실행할 SQL ID
|
set_downbuttonvisible(downbuttonvisibleopt)
- Description:
상단 다운로드 버튼 표시 여부설정
Example
this.ezFile.set_downbuttonvisible(true);
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
downbuttonvisible |
boolean |
<optional> |
true
|
상단 다운로드 버튼 표시 여부 |
set_downloadurl(downloadurlopt)
- Description:
파일 다운로드시 호출 경로설정
Example
this.ezFile.set_downloadurl("down");
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
downloadurl |
string |
<optional> |
"down"
|
파일 다운로드시 호출 경로 |
set_downsessionconf()
- Description:
로그인한 사용자만 다운로드 가능하게 할지 여부 설정
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
downsessionconf |
boolean |
<optional> |
true
|
로그인한 사용자만 다운로드 가능하게 할지 여부
|
Example
this.ezFile.set_downsessionconf(true);
set_filemode(filemode)
- Description:
파일모드 설정
Example
this.ezFile.set_filemode(nexacro.EzFile.FILE_MODE.SINGLE);
Parameters:
| Name | Type | Description |
|---|---|---|
filemode |
"single" | "multi" | "batch" | "singleblob" | "multiblob" | "batchblob" | "downloadonly" | 파일 모드 nexacro.EzFile.FILE_MODE 참조 |
set_gridbuttoncellsize(gridbuttoncellsize)
- Description:
그리드 버튼 cell 넓이설정
Example
this.ezFile.set_gridbuttoncellsize(48);
Parameters:
| Name | Type | Description |
|---|---|---|
gridbuttoncellsize |
number | 그리드 버튼 cell 넓이 |
set_gridcheckboxcellsize(gridcheckboxcellsize)
- Description:
그리드 체크박스 cell 넓이 설정
Example
this.ezFile.set_gridcheckboxcellsize(28);
Parameters:
| Name | Type | Description |
|---|---|---|
gridcheckboxcellsize |
number | 그리드 체크박스 cell 넓이 |
set_gridcssclass(gridcssclassopt)
- Description:
EzFile 내부 Grid에 cssclass 적용
Example
this.ezFile.set_gridcssclass("ezfilegrid");
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
gridcssclass |
string |
<optional> |
"ezfilegrid"
|
파일 목록 Grid에 적용할 cssclass |
set_griddelbtncssclass(griddelbtncssclassopt)
- Description:
파일 목록 Grid의 삭제버튼 cell에 적용할 cssclass 설정
Example
this.ezFile.set_griddelbtncssclass("ezfilegriddelbtn");
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
griddelbtncssclass |
string |
<optional> |
"ezfilegriddelbtn"
|
파일 목록 Grid의 삭제버튼 cell에 적용할 cssclass |
set_griddelvisible(griddelvisibleopt)
- Description:
파일 목록 Grid에 삭제 버튼 표시 여부 설정
Example
this.ezFile.set_griddelvisible(true);
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
griddelvisible |
boolean |
<optional> |
true
|
파일 목록 Grid에 삭제 버튼 표시 여부 |
set_griddownbtncssclass(griddownbtncssclassopt)
- Description:
파일 목록 Grid의 다운버튼 cell에 적용할 cssclass 설정
Example
this.ezFile.set_griddownbtncssclass("ezfilegriddownbtn");
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
griddownbtncssclass |
string |
<optional> |
"ezfilegriddownbtn"
|
파일 목록 Grid의 다운버튼 cell에 적용할 cssclass |
set_griddownvisible(griddownvisibleopt)
- Description:
파일 목록 Grid에 다운로드 버튼 표시 여부 설정
Example
this.ezFile.set_griddownvisible(true);
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
griddownvisible |
boolean |
<optional> |
true
|
파일 목록 Grid에 다운로드 버튼 표시 여부 |
set_gridfilenmcssclass()
- Description:
파일 목록 Grid의 File명 cell에 적용할 cssclass 설정
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
gridfilenmcssclass |
string |
<optional> |
"ezfilegridfilenm"
|
파일 목록 Grid의 File명 cell에 적용할 cssclass |
Example
this.ezFile.set_gridfilenmcssclass("ezfilegridfilenm");
set_gridfilesizecssclass(gridfilesizecssclassopt)
- Description:
파일 목록 Grid의 File Size cell에 적용할 cssclass 설정
Example
this.ezFile.set_gridfilesizecssclass("ezfilegridfilesize");
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
gridfilesizecssclass |
string |
<optional> |
"ezfilegridfilesize"
|
파일 목록 Grid의 File Size cell에 적용할 cssclass |
set_gridheadheight(gridheadheight)
- Description:
그리드 header 높이 설정
Example
this.ezFile.set_gridheadheight(21);
Parameters:
| Name | Type | Description |
|---|---|---|
gridheadheight |
number | 그리드 header 높이 |
set_gridheadvisible(gridheadvisibleopt)
- Description:
파일 목록 Grid에 Header 영역 표시 여부 설정
Example
this.ezFile.set_gridheadvisible(true);
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
gridheadvisible |
boolean |
<optional> |
true
|
파일 목록 Grid에 Header 영역 표시 여부 |
set_gridpaddingtop(gridpaddingtop)
- Description:
그리드 상단 패딩
Example
this.ezFile.set_gridpaddingtop(20);
Parameters:
| Name | Type | Description |
|---|---|---|
gridpaddingtop |
number | 그리드 상단 패딩 |
set_gridpreviewbtncssclass(gridpreviewbtncssclassopt)
- Description:
파일 목록 Grid의 미리보기버튼 cell에 적용할 cssclass 설정
Example
this.ezFile.set_gridpreviewbtncssclass("ezfilegridpreviewbtn");
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
gridpreviewbtncssclass |
string |
<optional> |
"ezfilegridpreviewbtn"
|
파일 목록 Grid의 미리보기버튼 cell에 적용할 cssclass |
set_gridpreviewvisible(gridpreviewvisibleopt)
- Description:
파일 목록 Grid에 미리보기 버튼 표시 여부 설정
Example
this.ezFile.set_gridpreviewvisible(true);
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
gridpreviewvisible |
boolean |
<optional> |
true
|
파일 목록 Grid에 미리보기 버튼 표시 여부 |
set_gridtypevisible(gridtypevisibleopt)
- Description:
파일 목록 Grid에 유형(또는 썸네일) 칼럼 표시 여부 설정
Example
this.ezFile.set_gridtypevisible(true);
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
gridtypevisible |
boolean |
<optional> |
true
|
파일 목록 Grid에 유형(또는 썸네일) 칼럼 표시 여부 |
set_host(host)
- Description:
파일 다운로드시 호출할 서버 설정
Example
this.ezFile.set_host("http://localhost:8080/");
Parameters:
| Name | Type | Description |
|---|---|---|
host |
string | 파일 다운로드시 호출할 서버 |
set_locale(locale)
Example
this.ezFile.set_locale("ko_KR");
Parameters:
| Name | Type | Description |
|---|---|---|
locale |
string | 지역코드 |
set_maxcount()
- Description:
최대 업로드 가능한 파일 수 설정
Properties:
| Name | Type | Description |
|---|---|---|
maxcount |
Number | 최대 업로드 가능한 파일 수
|
Example
this.ezFile.set_maxcount(10);
set_maxsize(maxsize)
- Description:
파일당 업로드 최대 크기(MiB) 설정
- 음수 입력시 무제한(10MiB 이하 권장)
Example
this.ezFile.set_maxsize(10);
Parameters:
| Name | Type | Description |
|---|---|---|
maxsize |
number | 단일 파일명 업로드 최대 크기(MiB) |
set_notecssclass(notecssclassopt)
- Description:
비고 static에 적용할 cssclass 설정
Example
this.ezFile.set_notecssclass("ezfilenote");
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
notecssclass |
string |
<optional> |
"ezfilenote"
|
비고 static에 적용할 cssclass |
set_notepaddingtop(notepaddingtop)
- Description:
비고영역 상단 패딩 설정
Example
this.ezFile.set_notepaddingtop(20);
Parameters:
| Name | Type | Description |
|---|---|---|
notepaddingtop |
number | 비고영역 상단 패딩 |
set_notetext(notetext)
- Description:
비고 영역에 표시할 문자열 설정
Example
this.ezFile.set_notetext("* 10MiB 이하 파일만 업로드 가능합니다.");
Parameters:
| Name | Type | Description |
|---|---|---|
notetext |
string | 비고 영역에 표시할 문자열 |
set_padding(padding)
Example
this.ezFile.set_padding("10px 20px 10px 20px");
Parameters:
| Name | Type | Description |
|---|---|---|
padding |
string | 패딩, 넥사크로 padding 문자열 규칙에 따릅니다. |
set_refreshbuttoncssclass(refreshbuttoncssclassopt)
- Description:
상단 갱신 버튼에 적용할 cssclass 설정
Example
this.ezFile.set_refreshbuttoncssclass("ezfilerefreshbutton");
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
refreshbuttoncssclass |
string |
<optional> |
"ezfilerefreshbutton"
|
상단 갱신 버튼에 적용할 cssclass |
set_refreshbuttonvisible(refreshbuttonvisibleopt)
- Description:
상단 갱신 버튼 표시 여부 설정
Example
this.ezFile.set_refreshbuttonvisible(true);
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
refreshbuttonvisible |
boolean |
<optional> |
true
|
상단 갱신 버튼 표시 여부 |
set_savepath()
- Description:
savepath 파일 저장 경로 설정
Properties:
| Name | Type | Description |
|---|---|---|
savepath |
string | 파일 저장 경로 |
Example
this.ezFile.set_savepath("files");
set_savesql(savesqlopt)
- Description:
파일 정보 저장시 호출되는 SQL ID 설정
Example
this.ezFile.set_savesql("@ezFile.insert");
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
savesql |
string |
<optional> |
"@ezFile.insert"
|
파일 정보 저장시 호출되는 SQL ID |
set_selectsql(selectsqlopt)
- Description:
파일 정보 조회시 호출되는 SQL ID 설정
Example
this.ezFile.set_selectsql("@ezFile.search");
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
selectsql |
string |
<optional> |
"@ezFile.search"
|
파일 정보 조회시 호출되는 SQL ID |
set_skipalert(skipalertopt)
- Description:
전/후처리 alert skip여부 설정
Example
this.ezFile.set_skipalert(true);
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
skipalert |
boolean |
<optional> |
false
|
전/후처리 alert skip여부 |
set_skippreviewconfirm(skippreviewconfirmopt)
- Description:
미리보기 할때 confirm skip여부 설정
Example
this.ezFile.set_skippreviewconfirm(true);
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
skippreviewconfirm |
boolean |
<optional> |
true
|
미리보기 할때 confirm skip여부 |
set_thumbnailpadding(thumbnailpadding)
Example
this.ezFile.set_thumbnailpadding("10px 20px 10px 20px");
Parameters:
| Name | Type | Description |
|---|---|---|
thumbnailpadding |
string | 섬네일셀패딩, 넥사크로 padding 문자열 규칙에 따릅니다. |
set_thumbnailsize(thumbnailsize)
- Description:
파일 목록 Grid의 썸네일 Cell 크기 설정
Example
this.ezFile.set_thumbnailsize("60 40");
Parameters:
| Name | Type | Description |
|---|---|---|
thumbnailsize |
string | 파일 목록 Grid의 썸네일 Cell 크기 |
set_uploadurl(uploadurl)
- Description:
파일 업로드시 호출할 URL 설정
Example
this.ezFile.set_uploadurl("upload");
Parameters:
| Name | Type | Description |
|---|---|---|
uploadurl |
string | 파일 업로드시 호출할 URL |
set_usethumbnail(usethumbnailopt)
- Description:
파일 목록 Grid의 썸네일 Cell 표시 여부 설정
Example
this.ezFile.set_usethumbnail(true);
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
usethumbnail |
boolean |
<optional> |
true
|
파일 목록 Grid의 썸네일 Cell 표시 여부 |
set_willrename(willrenameopt)
- Description:
파일 업로드시 파일명 난수화 여부 설정
- 난수화 설정시 서버에 저장될 때 난수화 된 이름으로 저장되고 다운로드시에는 원래의 파일명으로 다운로드 됩니다.
Example
this.ezFile.set_willrename(true);
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
willrename |
boolean |
<optional> |
true
|
파일 업로드시 파일명 난수화 여부 |
uploadVirtualFile(virtualfile) → {Promise}
- Description:
virtualFile 하나를 파일 목록에 추가한다.
- virtualFile은 FileDialog나 FileUpload 컴포넌트나 Grid 의 ondrop이벤트 의해 생성된 것만 유효함
Example
this.ezFile.uploadVirtualFile(vFile);
Parameters:
| Name | Type | Description |
|---|---|---|
virtualfile |
nexacro.VirtualFile | 업로드할 virtualfile |
Returns:
삭제 처리 결과 Promise
- Type
- Promise
uploadVirtualFiles(virtualfiles) → {Promise}
- Description:
virtualFile들을 파일 목록에 추가한다.
- virtualFile은 FileDialog나 FileUpload 컴포넌트나 Grid 의 ondrop이벤트 의해 생성된 것만 유효함
Example
this.ezFile.uploadVirtualFiles([vFile]);
Parameters:
| Name | Type | Description |
|---|---|---|
virtualfiles |
Array.<nexacro.VirtualFile> | 업로드할 virtualfile의 목록 |
Returns:
삭제 처리 결과 Promise
- Type
- Promise