Set the maximum file size and the number of files. If not set, it is unlimited.
Name | Type | Default | Description |
---|---|---|---|
maxFileCount | Number | unlimited | Set the maximum number of attachable files |
maxFileSize | Number | unlimited | Set the maximum size of one file (bytes) |
maxTotalSize | Number | unlimited | Set the total size of attachable files (bytes) |
box = innorix.create({
...
maxFileCount : 10,
maxFileSize : 100,
maxTotalSize : 1000,
...
});
Set the file types to allow attachment.
Name | Type | Default | Description |
---|---|---|---|
allowType | String Array | unlimited |
Allow to attach only entered file types e.g ["jpg", "gif", "png"] ※ denyType is higher priority than allowType |
box = innorix.create({
...
allowType : ["jpg", "gif", "png"],
...
});
Set the file types to deny attachment.
Name | Type | Default | Description |
---|---|---|---|
denyType | String Array |
Deny to attach entered file types e.g ["exe", "msi", "cab"] ※ When specifying the same extension policy as allowType, denyType is applied first |
box = innorix.create({
...
denyType : ["exe", "msi", "cab"],
...
});
If “true”, duplicate files can be attached.
Name | Type | Default | Description |
---|---|---|---|
addDuplicateFile | Boolean | false | Allow to attach duplicate files. |
box = innorix.create({
...
addDuplicateFile : true,
...
});
Get the total size of all files in the file box.
var fileInfo = box.getTotalSize();
Get the total number of all files in the file box.
var fileInfo = box.getFileCount();
Get the detailed information of all files in the file box.
var fileInfo = box.getAllFiles();
Name | Description |
---|---|
basePath | Attached path (String) |
boxId | File box ID (String) |
filePath | Full path of the attached file (String) |
fileSize | File size (Number) / Byte |
folderName | Folder name (String) |
id | File ID (String) |
mode | Transfer mode (String) |
printFileName | Displayed filename (String) |
rootName | Folder name (String) |
rowID | File row index ID (String) |
selected | Selected or not (Boolean) |
transferType | Transfer mode (String) |
uniqueFileName | Unique file name (String) |
uploadUrl | Upload URL (String) |
downloadUrl | Download URL (String) |
sliceSize | File slice size (Number) / Byte |
validate | Validate the file (Boolean) |
Get the detailed information of the index number file.
var fileInfo = box.getFileByIndex(0);
Name | Description |
---|---|
basePath | Attached path (String) |
boxId | File box ID (String) |
filePath | Full path of the attached file (String) |
fileSize | File size (Number) / Byte |
folderName | Folder name (String) |
id | File ID (String) |
mode | Transfer mode (String) |
printFileName | Displayed filename (String) |
rootName | Folder name (String) |
rowID | File row index ID (String) |
selected | Selected or not (Boolean) |
transferType | Transfer mode (String) |
uniqueFileName | Unique file name (String) |
uploadUrl | Upload URL (String) |
downloadUrl | Download URL (String) |
sliceSize | File slice size (Number) / Byte |
validate | Validate the file (Boolean) |
Set all file POST data identically.
var postObj = new Object();
postObj.type = "t31";
postObj.part = "p25";
box.setPostData(postObj);
box.upload();
Set all file POST data individually.
var fileCnt = box.getFileCount();
for(i=0; i < fileCnt ; ++i){
var postObj = new Object();
postObj.type = "t31";
postObj.part = "p25";
box.setFilePostDataByIndex(i, postObj);
}
Modify the code to change the upload path in the server. The upload path needs the write permission.
directory = “./data/”;
InnorixUpload uploader = new InnorixUpload(request, response, maxPostSize, directory);
Write codes to change the uploaded file name in the server.
uploader.setFileName(rename);
Get all file information after starting the upload.
String _action = uploader.getParameter("_action");
if(_action.equals("getFileInfo")){
}
Name | getFileInfo |
---|---|
Description | When the upload is started in the server |
parameter |
_action // Upload action flag _origin_filename // Original file name _filesize // File size _folder // Folder information _clientpath // Attached file client path _compressed // Compressed file _rootPath // Root path _subdir // Sub directory path _encrypt // Encrypt transfer _transferId // Transfer ID _slice_transfer // Slice transfer use _duplicationFile // Duplicate file policy _empty_folder // Empty folder information |
Get each file transfer status while uploading.
String _action = uploader.getParameter("_action");
if(_action.equals("attachFile")){
}
Name | attachFile |
---|---|
Description | Each file transfer status while uploading |
parameter |
_action // Upload action flag _origin_filename // Original file name _new_filename // Save file name _filesize // File size _folder // Folder information _clientpath // Attached file client path _serverpath // Attached file save path _compressed // Compressed file _rootPath // Root path _subdir // Sub directory path _encrypt // Encrypt transfer _transferId // Transfer ID _slice_transfer // Slice transfer use _duplicationFile // Duplicate file policy _empty_folder // Empty folder information _cookie // Session cookie information _start_offset // Slice start point _end_offset // Slice end point _orig_start_offset // Resume transfer start point |
Save the uploaded file information and form value to the database.
String _action = uploader.getParameter("_action");
if(_action.equals("attachFileCompleted")){
}
Name | attachFileComplete |
---|---|
Description | When each file upload is completed |
parameter |
_action // Upload action flag _origin_filename // Original file name _new_filename // Save file name _filesize // File size _folder // Folder information _filepath // Attached file save path _compressed // Compressed file _rootPath // Root path _subdir // Sub directory path _encrypt // Encrypt transfer _transferId // Transfer ID _slice_transfer // Slice transfer use _duplicationFile // Duplicate file policy _empty_folder // Empty folder information _isfolder // Folder information _check_integrity // Integrity transfer _integrity_crc32 // Check crc32 value _integrity_md5 // Check md5 value _merging // Merging |
After uploading all files to the server, the front end gets the uploaded information from the server.
box.on('uploadComplete', function (p) {
console.log(p);
});
Name | uploadComplete |
---|---|
Description | When the upload completed |
parameter |
clientFileName // Displayed filename (String) clientFilePath // Attached file full path (String) boxId // File box ID (String) basePath // Attached path (String) customeValue // Customized value (String) fileSize // File size(Number) / Byte folderName // Folder name (String) fileState // Transfer status (String) isFolder // Folder information (Boolean) rootName // Folder name (String) rowID // File row index ID (String) serverFileName // Save file name (sting) serverFilePath // Save folder path (String) uploadUrl // Upload URL (String) progress // Progress (Number) / % retries // Retry count (Number) speed // Transfer speed(Number) /Byte/s state // Status (String) stausMessage // Status (Object) errorCode // Error code (Boolean/String) id // Status title (String) totalSize // Total size (Number) / Byte transferID // Transfer ID (String) transferSize // Transfer size (Number) / Byte type // Transfer mode (String) |
The download file URL must start with http(s):// and must be an accessible address.
Even if the actual file name is “a.txt” in the server, it can be displayed as “The File AAA.txt” in the file box. If not set, the actual file name (“a.txt”) will be displayed.
For better performance, it is recommended to enter the file size.
If not set, Exabyter will automatically get the file size.
box.presetDownloadFiles(
[{
downloadUrl: “http://your web server address/a.txt”,
printFileName: " The File AAA.txt ",
fileSize: 1433885
}]
It is the most basic way, just set the actual file URL directly.
box.presetDownloadFiles(
[{
downloadUrl: “http://your web server address/INNORIX Exabyter Brochure.pdf”,
printFileName: "INNORIX Exabyter Brochure.pdf",
fileSize: 1433885
}]
Stream downloads are used in most enterprise environments for the following cases:
1) Only logged in users can download the file.
2) The actual file path cannot be exposed for security reasons.
3) The actual file is in database as a BLOB.
4) The actual file path is not accessible from a web browser (e.g. the actual file exists in /usr/local/mount.)
box.presetDownloadFiles([{
downloadUrl: “http://your web server address/download.jsp?fileID=1”,
printFileName: "INNORIX Exabyter Brochure.pdf",
fileSize: 1433885
}]);
String fileID = request.getParameter("fileID");
String fileName = request.getParameter("fileName");
String sysFileName = new String();
String orgFileName = new String();
if (fileID != null) {
if (fileID.equals("1")) {
sysFileName = "sample-file.pdf";
orgFileName = "INNORIX WP Brochure.pdf";
}
}
File file = new File(sysFileName);
Get the total size of all files in the file box.
var fileInfo = box.getTotalSize();
Get the total number of all files in the file box.
var fileInfo = box.getFileCount();
Get the detailed information of all files in the file box.
var fileInfo = box.getAllFiles();
Name | Description |
---|---|
basePath | Attached path (String) |
boxId | File box ID (String) |
filePath | Full path of the attached file (String) |
fileSize | File size (Number) / Byte |
folderName | Folder name (String) |
id | File ID (String) |
mode | Transfer mode (String) |
printFileName | Displayed filename (String) |
rootName | Folder name (String) |
rowID | File row index ID (String) |
selected | Selected or not (Boolean) |
transferType | Transfer mode (String) |
uniqueFileName | Unique file name (String) |
uploadUrl | Upload URL (String) |
downloadUrl | Download URL (String) |
sliceSize | File slice size (Number) / Byte |
validate | Validate the file (Boolean) |
Get the detailed information of the index number file.
var fileInfo = box.getFileByIndex(0);
Name | Description |
---|---|
basePath | Attached path (String) |
boxId | File box ID (String) |
filePath | Full path of the attached file (String) |
fileSize | File size (Number) / Byte |
folderName | Folder name (String) |
id | File ID (String) |
mode | Transfer mode (String) |
printFileName | Displayed filename (String) |
rootName | Folder name (String) |
rowID | File row index ID (String) |
selected | Selected or not (Boolean) |
transferType | Transfer mode (String) |
uniqueFileName | Unique file name (String) |
uploadUrl | Upload URL (String) |
downloadUrl | Download URL (String) |
sliceSize | File slice size (Number) / Byte |
validate | Validate the file (Boolean) |
The upload information will be sent to the Monitor & Track in real time.
Name | Type | Default | Description |
---|---|---|---|
monitorURL | String |
Set the monitor and track server address (INNROIX Platform server) e.g. “http://test.innorix.com/mt/transfer” |
box = innorix.create({
…
monitorURL: “http://your monitor server address/mt/transfer”,
…
});
Set to use both upload and download functions in the same file box.
Name | Type | Default | Description |
---|---|---|---|
transferMode | String | both |
Set the file box transfer mode. both : Upload and download in the same file box upload : Only upload download : Only download |
box = innorix.create({
…
transferMode: "both",
…
});
Set the upload server address using “https://”
box = innorix.create({
…
uploadURL : "https://your web server address/upload.jsp",
…
});
Set the download file URL using “https://”
box.presetDownloadFiles([{
downloadUrl: “https://your web server address/download.jsp?fileID=1”,
…
}]);
When uploading images, their resized images are created and uploaded together. (jpg, png, gif, bmp)
Name | appendThumbnailProperty() |
---|---|
Description | When uploading images, their resized images are created and uploaded together. (jpg, png, gif, bmp) |
Input parameter |
# JSON Object Index(String), Width(Number), Height(Number), Baseline(STRING) box.appendThumbnailProperty(1, 300, 200, “VERTICAL”); box.appendThumbnailProperty(“ALL”, 300, 200, “HORIZONTAL”); box.appendThumbnailProperty(“ALL”, 300, 200, “FIX”); |
box.appendThumbnailProperty(“ALL”, 300, 200, “HORIZONTAL”);
box.upload();
When uploading images, add a watermark on the original and resized images and upload them. jpg, png, gif, bmp
Name | appendWatermarkProperty() |
---|---|
Description | When uploading images, add a watermark on the original and resized images and upload them. jpg, png, gif, bmp |
Input parameter |
# JSON Object
Index(String), imageUrl(String), Image type(String), Position(String) box.appendWatermarkProperty("ALL", "./logo.png", "ALL", "LEFT|BOTTOM") box.appendWatermarkProperty("1", "./logo.png", "ORIGINAL", "RIGHT|TOP") box.appendWatermarkProperty("1", "./logo.png", "THUMBNAIL", "CENTER|CENTER") |
box.appendWatermarkProperty("ALL", "./logo.png", "ALL", "LEFT|BOTTOM")
box.upload();
Set the file box type.
Name | Type | Default | Description |
---|---|---|---|
boxSkin | String | simple1 |
Set the file box skin. simple1 : Dot icons is in front of file names simple2 : File type icon is in front of a file names simple3 : Display only file names detail1: Add to display file types and modified dates on simple1 detail2: Add to display file types and modified dates on simple2 detail3: Add to display file types and modified dates on simple3 |
box = innorix.create({
…
boxSkin: “simple1”,
…
})
Set the file box size (pixel).
Name | Type | Default | Description |
---|---|---|---|
boxHeight | Number | 200 | Set the file box height (pixels) |
boxWidth | Number | 600 | Set the file box width (pixel) |
box = innorix.create({
…
boxHeight: 200,
boxWidth: 600,
…
})
Set the image preview in the file box.
Name | Type | Default | Description |
---|---|---|---|
showPreviewImage | Boolean | false | Preview the selected image file in the file box. |
box = innorix.create({
…
showPreviewImage: true,
…
})
Get the file information when it is click or double clicked.
box.on('onDblClickRows', function (p) {
console.log(p);
});
Name | onDblClickRows |
---|---|
Description | When double click a file in the file box |
parameter |
basePath // Attached path (String) boxId // File box ID (String) filePath // Attached file full path (String) fileSize // File size(Number) / Byte folderName // Folder name (String) id // File ID (String) mode // Transfer mode (String) printFileName // Displayed filename (String) rootName // Folder name (String) rowID // File row index ID (String) selected // Selected or not (Boolean) transferType // Transfer mode (String) uniqueFileName // Unique file name (String) uploadUrl // Upload URL (String) downloadUrl // Download URL (String) sliceSize // Slice size (Number) / Byte validate // Validate the file (Boolean) |
Set the drag and drop whether to support or not.
Name | Type | Default | Description |
---|---|---|---|
enableDropZone | Boolean | true | Activate the drop zone in the file box. |
box = innorix.create({
…
enableDropZone: true,
…
})
Set the context menu whether to use or not.
Name | Type | Default | Description |
---|---|---|---|
useContextMenu | Boolean | true | Activate the context menu in the file box. |
box = innorix.create({
…
useContextMenu: true,
…
})
Name | openFileDialog() |
---|---|
Description | Open the multi file dialog |
<input type="button" value="Multi file browse button" onclick="box.openFileDialog();"/>
Name | openFileDialogSingle() |
---|---|
Description | Open the single file dialog |
<input type="button" value=”Single file browse button" onclick="box.openFileDialogSingle ();"/>
Name | removeSelectedFiles() |
---|---|
Description | Remove the selected files in the file box |
<input type="button" value="Remove the selected files" onclick="box.removeSelectedFiles();"/>
Name | removeAllFiles() |
---|---|
Description | Remove all files in the file box |
<input type="button" value=”Remove all files" onclick="box.removeAllFiles();"/>
Name | upload() |
---|---|
Description | Upload all files in the file box |
<input type="button" value=”Upload" onclick="box.upload();"/>
Name | download() |
---|---|
Description | Download all files in the file box |
<input type="button" value=”Download all files" onclick="box.download();"/>
Name | downloadSelectedFiles() |
---|---|
Description | Download the selected files in the file box |
<input type="button" value=”Download the selected files" onclick="box.downloadSelectedFiles();"/>
Set the transfer window whether to use or not. If “false”, transfer window will not be displayed while transferring.
Name | Type | Default | Description |
---|---|---|---|
showTransferWindow | Boolean | true | Activate to display the transfer window |
box = innorix.create({
…
showTransferWindow: true,
…
})
Name | Type | Default | Description |
---|---|---|---|
fileListWindowMode | Boolean | false | Display the upload or download file list on the transfer window |
box = innorix.create({
…
fileListWindowMode : true,
…
})
Name | Type | Default | Description |
---|---|---|---|
fileListWindowStatus | Boolean | false | Add to display each file transfer status on the transfer window |
box = innorix.create({
…
fileListWindowStatus : true,
…
})
Without user clicking the upload button, the files will be uploaded automatically.
box.on('afterAddFiles', function (p) {
box.upload();
});
Without user clicking the download button, the files will be downloaded automatically.
box.on('afterAddFiles', function (p) {
box.download();
});
Without user clicking the start button on the transfer window, the upload or download will start automatically when displaying the transfer window.
Name | Type | Default | Description |
---|---|---|---|
transferStart | JSON Text | “upload”:”auto”, “download”: “manual” |
Activate to start transferring automatically e.g { “upload”:”auto”, “download”: “manual” } auto: Start transferring, when the transfer window displays manual: User needs to click start button in the transfer window |
box = innorix.create({
…
transferStart: {
"upload":"auto",
"download": "manual"
}
…
})
Create a file attachment area that supports drag & drop without using the file box.
<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 box = new Object();
var innoJquery = innorix._load("innoJquery");
window.onload = function() {
box = innorix.create({
el: '#fileControl',
installURL: '../install/install.html',
uploadURL: './upload.jsp'
});
innoJquery("#dropZone").on({
"dragenter": function(innoJqueryevt) {
box.setDropZone(innoJqueryevt, this);
}
});
};
</script>
</head>
<body>
<table id="dropZone" style="width:555px; height:150px; border: 1px solid green">
<tr><td align="center">Drop files and folders here</td></tr>
</table><br /><br />
<div id="fileControl"></div><br/>
<input type="button" value="Multi file browse button" onclick="box.openFileDialog();"/>
<input type="button" value="Upload" onclick="box.upload();"/>
</body>
</html>
Create multiple upload file boxes on a webpage.
<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 box1 = new Object();
var box2 = new Object();
window.onload = function() {
box1 = innorix.create({
el: '#fileControll',
uploadURL: './upload.jsp?el=fileControll'
});
box2 = innorix.create({
el: '#fileControl2',
uploadURL: './upload.jsp?el=fileControl2'
});
box1.on('uploadComplete', function (p) {
});
box2.on('uploadComplete', function (p) {
});
};
</script>
</head>
<body>
<div id="fileControll"></div><br />
<input type="button" value="Multi file browse button" onclick="box1.openFileDialog();"/>
<input type="button" value="Upload" onclick="box1.upload();" /><br /><br />
<div id="fileControl2"></div><br />
<input type="button" value="Multi file browse button" onclick="box2.openFileDialog();"/>
<input type="button" value="Upload" onclick="box2.upload();" />
</body>
</html>
Create multiple download file boxes on a webpage.
<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 box1 = new Object();
var box2 = new Object();
var urlBase = location.href.substring(0, location.href.lastIndexOf("/") + 1);
window.onload = function() {
box1 = innorix.create({
el: '#fileControl1'
});
box2 = innorix.create({
el: '#fileControl2'
});
box1.on('loadComplete', function (p) {
box1.presetDownloadFiles([{
printFileName: "INNORIX Exabyter Brochure(EN).pdf",
fileSize: 1433885,
downloadUrl: urlBase + "download.jsp?fileID=1"
}]);
});
box2.on('loadComplete', function (p) {
box2.presetDownloadFiles([{
printFileName: "INNORIX Exabyter Brochure(KR).pdf",
fileSize: 1433885,
downloadUrl: urlBase + "download.jsp?fileID=2"
}]);
});
};
</script>
</head>
<body>
<div id="fileControl1"></div><br/>
<input type="button" value="Download the selected files" onclick="box1.downloadSelectedFiles();"/>
<input type="button" value="Download all files" onclick="box1.download();"/><br /><br />
<div id="fileControl2"></div><br/>
<input type="button" value="Download the selected files" onclick="box2.downloadSelectedFiles();"/>
<input type="button" value="Download all files" onclick="box2.download();"/>
</body>
</html>
Name | Types | Default | Description |
---|---|---|---|
boxSkin | String | simple1 |
Set the file box skin. simple1 : Dot icons is in front of file names simple2 : File type icon is in front of a file names simple3 : Display only file names detail1: Add to display file types and modified dates on simple1 detail2: Add to display file types and modified dates on simple2 detail3: Add to display file types and modified dates on simple3 |
boxHeight | Number | 200 | Set the file box height (pixels) |
boxWidth | Number | 200 | Set the file box width (pixel) |
useContextMenu | Boolean | true | Activate the context menu in the file box |
enableDropZone | Boolean | true | Activate the drop zone in the file box |
useFuncBtn | Number | 0 |
Activate the function buttons in the file box. 0 : Display all buttons 1 : Display the select buttons except the move and remove buttons 2 : Do not display all buttons |
maxMassFileListCount | Number | 1000 |
Set the maximum number of files in the standard file box UI. When this number is exceeded, the file box UI switches to the mass file attach mode. |
showPreviewImage | Boolean | false |
Preview the selected image file in the file box. -Only support in the HTML5 mode |
Name | Types | Default | Description |
---|---|---|---|
uploadURL | String | Set the upload processing file address. | |
transferMode | String | both |
Set the file box transfer mode. both : Upload and download in the same file box upload : Only upload download : Only download |
transferStart | JSON Text | “upload”:”auto”, “download”: “manual” |
Activate to start transferring automatically e.g { “upload”:”auto”, “download”: “manual” } auto: Start transferring, when the transfer window displays manual: User needs to click start button in the transfer window |
downloadType | String | stream |
Set download URL type direct: http://abc.com/file.dat format stream: http://abc.com/down.jsp?fid=33 format |
Name | Types | Default | Description |
---|---|---|---|
showTransferWindow | Boolean | true | Activate to display the transfer window |
draggableTransferWindow | Boolean | true | Allow to drag the transfer window |
transferWindowTitle | String | Exabyter | Set the transfer window title. |
cancelConfirmation | Boolean | false | When canceling, display a confirmation dialog |
showByteSize | Boolean | false | Set the file size unit to Byte |
iframeOutside | Boolean | true | When the file box is in iframe, the transfer window will be displayed outside of the iframe. |
iframeOutside | String | Set the CSS URL (innorix.css) for the parent frame | |
iframeOutsideLeft | Number | Set the transfer window location from the left (pixel) | |
iframeOutsideTop | Number | Set the transfer window location from the top (pixel) | |
iframeOutsideLocation | String |
top: Display the transfer window in the top frame parent: Display 1 level upper layer from the file box frame |
|
iframeOutsideMarginLeft | Number | Set the transfer windows margin from the left (pixel) | |
iframeOutsideMarginTop | Number | Set the transfer windows margin from the top (pixel) | |
fileListWindowMode | Boolean | false | Display the upload or download file list on the transfer window |
fileListWindowStatus | Boolean | false | Add to display each file transfer status on the transfer window |
Name | Types | Default | Description |
---|---|---|---|
html5 | Boolean | true |
true: Use HTML5 mode false: Use Agent mode |
autoHtml5Mode | Boolean | false |
When the agent is not installed, it will use HTML5 mode. If it is ‘true’, a user can see the installation page. |
Name | Types | Default | Description |
---|---|---|---|
allowType | String Array | Allow to attach only entered file types e.g ["jpg", "gif", "png"] ※ denyType is higher priority than allowType | |
denyType | String Array | Deny to attach entered file types e.g ["exe", "msi", "cab"] ※ When specifying the same extension policy as allowType, denyType is applied first | |
addDuplicateFile | Boolean | false | Allow to attach duplicate files. |
maxFileCount | Number | unlimited | Set the maximum number of attachable files |
maxFileSize | Number | unlimited | Set the maximum size of one file (bytes) |
maxTotalSize | Number | unlimited | Set the total size of attachable files (bytes) |
Name | Types | Default | Description |
---|---|---|---|
monitorURL | String |
Set the monitor and track server address (INNROIX Platform server) e.g. “http://test.innorix.com/mt/transfer” |
Name | openFileDialog() |
---|---|
Description | Open the multi file dialog |
Return type | None (void) |
Input parameter |
None |
Name | openFileDialogSingle() |
---|---|
Description | Open the single file dialog |
Return type | None (void) |
Input parameter |
None |
Name | presetDownloadFiles() |
---|---|
Description | None (void) |
Return type | Create download file list in the file box |
Input parameter |
# JSON Object [ { printFileName: "red.pdf ",// Displayed filename (String) fileSize: 1433885,// File size (Number) / Byte downloadUrl: “http://YourServerAddress/download.jsp?fileID=111”// Download URL (String) }, { printFileName: "blue.pdf",// Displayed filename (String) fileSize: 1433885, // File size (Number) / Byte downloadUrl: "http://YourServerAddress/download.jsp?fileID=222"// Download URL (String) } ] |
Name | addSelectFilesById() |
---|---|
Description | Select the ID file in the file box |
Return type | None (void) |
Input parameter |
(String) |
Name | removeFileByIndex() |
---|---|
Description | Remove the index number file in the file box |
Return type | None (void) |
Input parameter |
(Number) |
Name | removeFileById() |
---|---|
Description | Remove the ID file in the file box |
Return type | None (void) |
Input parameter |
(String) |
Name | removeSelectedFiles() |
---|---|
Description | Remove the selected files in the file box |
Return type | None (void) |
Input parameter |
None |
Name | removeAllFiles() |
---|---|
Description | Remove all files in the file box |
Return type | None (void) |
Input parameter |
None |
Name | destory() |
---|---|
Description | Destory the file box |
Return type | None (void) |
Input parameter |
None |
Name | getAllFiles() |
---|---|
Description | Get information of all files in the file box |
Return type | # JSON Object - Upload file value [ { "basePath": Attached path (String) "boxId": File box ID (String) "filePath": Full path of the attached file (String) "fileSize": File size (Number) / Byte "folderName: Folder name (String) "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rootName": Folder name (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "transferType": Transfer mode (String) "uniqueFileName": Unique file name (String) "uploadUrl": Upload URL (String) }, ] # JSON Object – Download file value [ { "downloadUrl": Download URL (String) "fileSize": File size (Number) / Byte "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "sliceSize": File slice size (Number) / Byte "transferType": Transfer mode (String) "validate": Validate the file (Boolean) } ] |
Input parameter |
None |
Name | getSelectedFiles() |
---|---|
Description | Get information of the selected files in the file box. |
Return type |
# JSON Object - Upload file value [ { "basePath": Attached path (String) "boxId": File box ID (String) "filePath": Full path of the attached file (String) "fileSize": File size (Number) / Byte "folderName: Folder name (String) "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rootName": Folder name (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "transferType": Transfer mode (String) "uniqueFileName": Unique file name (String) "uploadUrl": Upload URL (String) }, ] # JSON Object – Download file value [ { "downloadUrl": Download URL (String) "fileSize": File size (Number) / Byte "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "sliceSize": File slice size (Number) / Byte "transferType": Transfer mode (String) "validate": Validate the file (Boolean) } ] |
Input parameter |
None |
Name | getUploadFiles() |
---|---|
Description | Get information of all upload files in the file box |
Return type |
# JSON Object [ { "basePath": Attached path (String) "boxId": File box ID (String) "filePath": Full path of the attached file (String) "fileSize": File size (Number) / Byte "folderName: Folder name (String) "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rootName": Folder name (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "transferType": Transfer mode (String) "uniqueFileName": Unique file name (String) "uploadUrl": Upload URL (String) }, ] |
Input parameter |
None |
Name | getDownloadFiles() |
---|---|
Description | Get information of all download files in the file box |
Return type |
# JSON Object – Download file value [ { "downloadUrl ": Download URL (String) "fileSize ": File size (Number) / Byte "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "sliceSize": File slice size (Number) / Byte "transferType": Transfer mode (String) "validate": Validate the file (Boolean) } ] |
Input parameter |
None |
Name | getFileCount() |
---|---|
Description | Get the number of all files in the file box |
Return type | (Number) |
Input parameter |
None |
Name | getSelectedFileCount() |
---|---|
Description | Get the number of the selected files in the file box |
Return type | (Number) |
Input parameter |
None |
Name | getUploadFileSize() |
---|---|
Description | Get the total size of the upload files in the file box |
Return type | (Number) |
Input parameter |
None |
Name | getDownloadFileSize() |
---|---|
Description | Get the total size of the download files in the file box |
Return type | (Number) |
Input parameter |
None |
Name | getTotalSize() |
---|---|
Description | Get the total size of all files in the file box |
Return type | (Number) |
Input parameter |
None |
Name | getFileByIndex() |
---|---|
Description | Get information of the index file in the file box |
Return type |
# JSON Object - Upload file value [ { "basePath": Attached path (String) "boxId": File box ID (String) "filePath": Full path of the attached file (String) "fileSize": File size (Number) / Byte "folderName: Folder name (String) "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rootName": Folder name (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "transferType": Transfer mode (String) "uniqueFileName": Unique file name (String) "uploadUrl": Upload URL (String) }, ] # JSON Object – Download file value [ { "downloadUrl": Download URL (String) "fileSize": File size (Number) / Byte "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "sliceSize": File slice size (Number) / Byte "transferType": Transfer mode (String) "validate": Validate the file (Boolean) } ] |
Input parameter |
(Number) |
Name | getFileById() |
---|---|
Description | Get information of the ID file in the file box |
Return type |
# JSON Object - Upload file value [ { "basePath": Attached path (String) "boxId": File box ID (String) "filePath": Full path of the attached file (String) "fileSize": File size (Number) / Byte "folderName: Folder name (String) "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rootName": Folder name (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "transferType": Transfer mode (String) "uniqueFileName": Unique file name (String) "uploadUrl": Upload URL (String) }, ] # JSON Object – Download file value [ { "downloadUrl": Download URL (String) "fileSize": File size (Number) / Byte "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "sliceSize": File slice size (Number) / Byte "transferType": Transfer mode (String) "validate": Validate the file (Boolean) } ] |
Input parameter |
(String) |
Name | upload() |
---|---|
Description | Upload all files in the file box |
Return type | None (void) |
Input parameter |
None |
Name | uploadCancel() |
---|---|
Description | Cancel uploading |
Return type | None (void) |
Input parameter |
None |
Name | download() |
---|---|
Description | Download all files in the file box |
Return type | None (void) |
Input parameter |
None |
Name | downloadSelectedFiles() |
---|---|
Description | Download the selected files in the file box |
Return type | None (void) |
Input parameter |
None |
Name | setPostData() |
---|---|
Description | Create customized post data |
Return type | None (void) |
Input parameter |
# JSON Object { Name : Value, Name : Value, } |
Name | setFilePostDataByIndex() |
---|---|
Description | Create customized post data by index |
Return type | None (void) |
Input parameter |
# JSON Object Index(Number), { Name : Value, Name : Value, } |
Name | setSize() |
---|---|
Description | Set the file box size (pixel) |
Return type | None (void) |
Input parameter |
Width(Number), Height(Number) |
Name | setCookie() |
---|---|
Description | Keep the web session information. |
Return type | None (void) |
Input parameter |
(String) the example to keep session information after loading the file box box.on('loadComplete', function (p) { box.setCookie("JSESSIONID=<%=session.getId()%>"); }… |
Name | getTransferMode() |
---|---|
Description | Get the transfer mode |
Return type |
(String) upload : Upload mode download : Download mode both : Upload and download mode |
Input parameter |
None |
Name | appendThumbnailProperty() |
---|---|
Description | When uploading images, their resized images are created and uploaded together. (jpg, png, gif, bmp) |
Return type | None (void) |
Input parameter |
# JSON Object Index(String), Width(Number), Height(Number), Baseline(STRING) box.appendThumbnailProperty(1, 300, 200, “VERTICAL”); box.appendThumbnailProperty(“ALL”, 300, 200, “HORIZONTAL”); box.appendThumbnailProperty(“ALL”, 300, 200, “FIX”); |
Name | appendWatermarkProperty() |
---|---|
Description | When uploading images, add a watermark on the original and resized images and upload them. jpg, png, gif, bmp |
Return type | None (void) |
Input parameter |
# JSON Object
Index(String), imageUrl(String), Image type(String), Position(String) box.appendWatermarkProperty("ALL", "./logo.png", "ALL", "LEFT|BOTTOM") box.appendWatermarkProperty("1", "./logo.png", "ORIGINAL", "RIGHT|TOP") box.appendWatermarkProperty("1", "./logo.png", "THUMBNAIL", "CENTER|CENTER") |
Name | closeTransferWindow |
---|---|
Description | Close the transfer window |
Return type | None (void) |
Input parameter |
None (void) |
Name | setOverwrite() |
---|---|
Description | Overwrite when there are duplicate files |
Return type | None (void) |
Input parameter |
Boolean) – true, false |
Name | run() |
---|---|
Description | Start uploading |
Return type | None (void) |
Input parameter |
None (void) |
Name | setFileName() |
---|---|
Description | Rename the uploaded files in the server |
Return type | None (void) |
Input parameter |
String |
Name | setDirectory() |
---|---|
Description | Set the save path in the server |
Return type | None (void) |
Input parameter |
String |
Name | loadComplete |
---|---|
Description | After loading the file box |
Parameter | None (void) |
Name | beforeAddFile |
---|---|
Description | Before adding files in the file box |
Parameter |
# JSON Object { “basePath": Attached path(String) “boxId": File box ID (String) "filePath": Attached file full path (String) "fileSize": File size(Number) / Byte "mode": Transfer mode (String) "uploadUrl": Upload URL(String) } |
Name | afterAddFiles |
---|---|
Description | After adding files in the file box |
Parameter |
# JSON Object [ { "basePath": Attached path (String) "boxId": File box ID (String) "filePath": Attached file full path (String) "fileSize": File size(Number) / Byte "folderName": Folder name (String) "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rootName": Folder name (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "transferType": Transfer mode (String) "uniqueFileName": Unique file name (String) "uploadUrl": Upload URL (String) }, { "downloadUrl ": Download URL (String) "fileSize ": File size (Number) / Byte "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "sliceSize": Slice size(Number) / Byte "transferType": Transfer mode (String) "validate": Validate the file (Boolean) } ] |
Name | beforeRemoveFiles |
---|---|
Description | Before removing files in the file box |
Parameter |
# JSON Object [ { "basePath": Attached path (String) "boxId": File box ID (String) "filePath": Attached file full path (String) "fileSize": File size(Number) / Byte "folderName": Folder name (String) "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rootName": Folder name (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "transferType": Transfer mode (String) "uniqueFileName": Unique file name (String) "uploadUrl": Upload URL (String) }, { "downloadUrl ": Download URL (String) "fileSize ": File size (Number) / Byte "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "sliceSize": Slice size (Number) / Byte "transferType": Transfer mode (String) "validate": Validate the file (Boolean) } ] |
Name | removeFiles |
---|---|
Description | After removing file in the file box |
Parameter |
# JSON Object [ { "basePath": Attached path (String) "boxId": File box ID (String) "filePath": Attached file full path (String) "fileSize": File size(Number) / Byte "folderName": Folder name (String) "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rootName": Folder name (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "transferType": Transfer mode (String) "uniqueFileName": Unique file name (String) "uploadUrl": Upload URL (String) }, { "downloadUrl ": Download URL (String) "fileSize ": File size (Number) / Byte "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "sliceSize": Slice size (Number) / Byte "transferType": Transfer mode (String) "validate": Validate the file (Boolean) } ] |
Name | addFileError |
---|---|
Description | When an error occurs while attaching files in the file box |
Parameter |
# JSON Object [ { "basePath": Attached path (String) "boxId": File box ID (String) "filePath": Attached file full path (String) "fileSize": File size(Number) / Byte "mode": Transfer mode (String) "uploadUrl": Upload URL (String) } "message":"*.pdf file can not be attached.", // Error info (String) "*.ppt file can not be attached." "The maximum limit of a single file is 1.00 MB." "The maximum number of files is 1." "The maximum limit of total files is 1.00 MB" "The same file is already attached." "type":"limitExtension" // Error type (String) "allowExtension" "maxFileSize" "maxFileCount" "maxTotalSize" "addDuplicateFile" ] |
Name | onSelectRows |
---|---|
Description | When a file is selected in the file box |
Parameter |
# JSON Object [ { "basePath": Attached path (String) "boxId": File box ID (String) "filePath": Attached file full path (String) "fileSize": File size(Number) / Byte "folderName": Folder name (String) "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rootName": Folder name (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "transferType": Transfer mode (String) "uniqueFileName": Unique file name (String) "uploadUrl": Upload URL (String) }, { "downloadUrl ": Download URL (String) "fileSize ": File size (Number) / Byte "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "sliceSize": Slice size (Number) / Byte "transferType": Transfer mode (String) "validate": Validate the file (Boolean) } ] |
Name | onUnSelectRows |
---|---|
Description | When the selected file is unselected in the file box |
Parameter |
# JSON Object [ { "basePath": Attached path (String) "boxId": File box ID (String) "filePath": Attached file full path (String) "fileSize": File size(Number) / Byte "folderName": Folder name (String) "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rootName": Folder name (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "transferType": Transfer mode (String) "uniqueFileName": Unique file name (String) "uploadUrl": Upload URL (String) }, { "downloadUrl ": Download URL (String) "fileSize ": File size (Number) / Byte "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "sliceSize": Slice size (Number) / Byte "transferType": Transfer mode (String) "validate": Validate the file (Boolean) } ] |
Name | onDblClickRows |
---|---|
Description | When double click a file in the file box |
Parameter |
# JSON Object [ { "basePath": Attached path (String) "boxId": File box ID (String) "filePath": Attached file full path (String) "fileSize": File size(Number) / Byte "folderName": Folder name (String) "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rootName": Folder name (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "transferType": Transfer mode (String) "uniqueFileName": Unique file name (String) "uploadUrl": Upload URL (String) }, { "downloadUrl ": Download URL (String) "fileSize ": File size (Number) / Byte "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "sliceSize": Slice size (Number) / Byte "transferType": Transfer mode (String) "validate": Validate the file (Boolean) } ] |
Name | dropzoneShow |
---|---|
Description | When drop zone is activated. |
Parameter |
Name | dropzoneHide |
---|---|
Description | When drop zone is deactivated. |
Parameter |
Name | uploadStart |
---|---|
Description | When the upload started |
Parameter |
# JSON Object { “files”:[ { "basePath": Attached path (String) "boxId": File box ID (String) "filePath": Attached file full path (String) "fileSize": File size(Number) / Byte "folderName": Folder name (String) "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rootName": Folder name (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "transferType": Transfer mode (String) "uniqueFileName": Unique file name (String) "uploadUrl": Upload URL (String) }, ] “progress”: Progress (Number) / % “retries”: Retry count (Number) / Times “speed”: Transfer speed(Number) /Byte/s “state”: Status (String) “totalSize”: Total size (Number) / Byte “transferID”: Transfer ID (String) “transferSize”: Transfer size (Number) / Byte “type”: Transfer mode (String) } |
Name | uploadComplete |
---|---|
Description | When the upload completed |
Parameter |
# JSON Object { “files”:[ { "clientFileName": Displayed filename (String) "clientFilePath": Attached file full path (String) "boxId": File box ID (String) "basePath": Attached path (String) "customeValue": Customized value (String) "fileSize": File size(Number) / Byte "folderName": Folder name (String) "fileState": Transfer status (String) "isFolder": Folder information (Boolean) "rootName": Folder name (String) "rowID": File row index ID (String) "serverFileName": Save file name (sting) "serverFilePath": Save folder path (String) "uploadUrl": Upload URL (String) }, ] “progress”: Progress (Number) / % “retries”: Retry count (Number) “speed”: Transfer speed(Number) /Byte/s “state”: Status (String) “stausMessage”:{ “errorCode”: Error code (Boolean/String) “id”: Status title (String) }, “totalSize”: Total size (Number) / Byte “transferID”: Transfer ID (String) “transferSize”: Transfer size (Number) / Byte “type”: Transfer mode (String) } |
Name | uploadCancel |
---|---|
Description | When the upload canceled |
Parameter |
# JSON Object { “files”:[ { "clientFileName": Displayed filename (String) "clientFilePath": Attached file full path (String) "boxId": File box ID (String) "basePath": Attached path (String) "customeValue": Customized value (String) "fileSize": File size(Number) / Byte "folderName": Folder name (String) "fileState": Transfer status (String) "isFolder": Folder information (Boolean) "rootName": Folder name (String) "rowID": File row index ID (String) "serverFileName": Save file name (sting) "serverFilePath": Save folder path (String) "uploadUrl": Upload URL (String) }, ] “progress”: Progress (Number) / % “retries”: Retry count (Number) “speed”: Transfer speed(Number) /Byte/s “state”: Status (String) “stausMessage”:{ “errorCode”: Error code (Boolean/String) “id”: Status title (String) }, “totalSize”: Total size (Number) / Byte “transferID”: Transfer ID (String) “transferSize”: Transfer size (Number) / Byte “type”: Transfer mode (String) } |
Name | downloadStart |
---|---|
Description | When the download started |
Parameter |
# JSON Object { “files”:[{ "downloadUrl ": Download URL (String) "fileSize ": File size (Number) / Byte "id": File ID (String) "mode": Transfer mode (String) "printFileName": Displayed filename (String) "rowID": File row index ID (String) "selected": Selected or not (Boolean) "sliceSize": Slice size (Number) / Byte "transferType": Transfer mode (String) "validate": Validate the file (Boolean) }, ] “progress”: Progress (Number) / % “retries”: Retry count (Number) / Times “speed”: Transfer speed(Number) /Byte/s “state”: Status (String) “totalSize”: Total size (Number) / Byte “transferID”: Transfer ID (String) “transferSize”: Transfer size (Number) / Byte “type”: Transfer mode (String) } |
Name | getFileInfo |
---|---|
Description | When the upload is started in the server |
Parameter |
_action // Upload action flag _origin_filename // Original file name _filesize // File size _folder // Folder information _clientpath // Attached file client path _compressed // Compressed file _rootPath // Root path _subdir // Sub directory path _encrypt // Encrypt transfer _transferId // Transfer ID _slice_transfer // Slice transfer use _duplicationFile // Duplicate file policy _empty_folder // Empty folder information |
Name | attachFile |
---|---|
Description | Each file transfer status while uploading |
Parameter |
_action // Upload action flag _origin_filename // Original file name _new_filename // Save file name _filesize // File size _folder // Folder information _clientpath // Attached file client path _serverpath // Attached file save path _compressed // Compressed file _rootPath // Root path _subdir // Sub directory path _encrypt // Encrypt transfer _transferId // Transfer ID _slice_transfer // Slice transfer use _duplicationFile // Duplicate file policy _empty_folder // Empty folder information _cookie // Session cookie information _start_offset // Slice start point _end_offset // Slice end point _orig_start_offset // Resume transfer start point |
Name | attachFileComplete |
---|---|
Description | When each file upload is completed |
Parameter |
_action // Upload action flag _origin_filename // Original file name _new_filename // Save file name _filesize // File size _folder // Folder information _filepath // Attached file save path _compressed // Compressed file _rootPath // Root path _subdir // Sub directory path _encrypt // Encrypt transfer _transferId // Transfer ID _slice_transfer // Slice transfer use _duplicationFile // Duplicate file policy _empty_folder // Empty folder information _isfolder // Folder information _check_integrity // Integrity transfer _integrity_crc32 // Check crc32 value _integrity_md5 // Check md5 value _merging // Merging |
Using the code generator, you can easily generate the codes of the Exabyter UI and features.
For more detailed settings, refer to this manual and modify directly in the generated codes.
Open your LicenseKey.txt file and enter the license key on the code generator.
Choose your server-side language and then click the Next button.
Download the generated product file.
After unzipping the product file, you can see the following files.
Front end files | /exabyter/innorix.js /exabyter/innorix.css /exabyter/img/ /exabyter/exam/upload.html /exabyter/exam/download.html |
---|---|
Back end files |
/exabyter/exam/upload.jsp /exabyter/exam/download.jsp /exabyter/WEB-INF/lib/INNORIX-JAVA.jar |
Prepare your web server and then copy the front end files to your web server.
[/wwwroot/innorix] $ cp –r /download/exabyter/ /wwwroot/innorix/
Create the upload folder and give the write permission to save uploaded files on the server.
[/wwwroot/innorix/exabyter] $ mkdir data
[/wwwroot/innorix/exabyter] $ chmod 777 data
[/wwwroot/innorix] $ cp /download/exbyter/exam/upload.jsp /wwwroot/innorix/exabyter/exam/
[/wwwroot/innorix] $ cp /download/exbyter/exam/download.jsp /wwwroot/innorix/exabyter/exam/
[/wwwroot/innorix] $ cp /download/exabyter/WEB-INF/lib/INNORIX-JAVA.jar /wwwroot/WEB-INF/lib/
Visit http://your web server address/upload.html
You can see the transfer window after choosing files and click the Upload button.
Visit http://your web server address/download.html
You can see the transfer window after clicking the Download button.