INNORIX Exabyter Manual

Table of contents (INDEX)


Install Exabyter

Install the product files

1. Copy the front end files

Prepare a web server and copy the front end files to the web server.

[/wwwroot/innorix] $ cp -r /download/exabyter/ /wwwroot/innorix/

2. Create the upload path and give permission

Create the upload folder and grant write permission to the server so that uploaded files can be stored.

[/wwwroot/innorix/exabyter] $ mkdir data
[/wwwroot/innorix/exabyter] $ chmod 777 data

3. Copy the back end files

[/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/

4. Enter your license key

Open the LicenseKey.txt file and enter the license key in the code generator.

var INNORIX_LICENSE   = '956|919|126|80|20201120|……';
var INNORIX_SIGNATURE = 'oZ1oj7Ep0pRag8QrglupVW……';
var INNORIX_KEY       = 'MIIBoDANBgkqhkiG9w0BAQEFAAOC……';

After extracting the product files, you can see the following files.

Category Files
Front end files/exabyter/innorix.js<br>/exabyter/config.js<br>/exabyter/innorix.css<br>/exabyter/img/<br>/exabyter/exam/upload.html<br>/exabyter/exam/download.html
Back end files/exabyter/exam/upload.jsp<br>/exabyter/exam/download.jsp<br>/exabyter/WEB-INF/lib/INNORIX-JAVA.jar

Upload & download test

1. Upload test

Access http://your web server address/upload.html

Select a file and click the Upload button to display the transfer window.

2. Download test

Access http://your web server address/download.html

Click the Download button to display the transfer window.


Exabyter upload

STEP1: Front end process

1. File size and number of files

Set the maximum file size and number of files. If not set, there is no limit.

Name Type Default Description
maxFileCountNumberunlimitedSet the maximum number of attachable files
maxFileSizeNumberunlimitedSet the maximum size of one file (bytes)
maxTotalSizeNumberunlimitedSet the total size of attachable files (bytes)
innorix.config = {
    default: {
        ...
        maxFileCount : 10,
        maxFileSize  : 100,
        maxTotalSize : 1000,
        ...
}};

2. File types

Set the file types that can be attached.

Name Type Default Description
allowTypeString ArrayAllow to attach only entered file types<br>e.g ["jpg", "gif", "png"]<br>※ limitExtension is higher priority than allowExtension
innorix.config = {
    default: {
        ...
        allowType : ["jpg", "gif", "png"],
        ...
}};

Set the file types that are not allowed to be attached.

Name Type Default Description
denyTypeString ArrayDeny to attach entered file types<br>e.g ["exe", "msi", "cab"]<br>※ When specifying the same extension policy as allowExtension, LimitExtension is applied first
innorix.config = {
    default: {
        ...
        denyType : ["exe", "msi", "cab"],
        ...
}};

3. Duplicate files

If "true", duplicate files can be attached. (Default=false)

Name Type Default Description
addDuplicateFileBooleantrueAllow to attach duplicate files.
innorix.config = {
    default: {
        ...
        addDuplicateFile : true,
        ...
}};

4. Get all file information

Get the total size of all files in the list control.

var fileInfo = box.getTotalSize();

Get the total number of all files in the list control.

var fileInfo = box.getFileCount();

Get detailed information about all files in the list control.

var fileInfo = box.getAllFiles();

Name Description
basePathAttached path (String)
boxIdList control ID (String)
filePathFull path of the attached file (String)
fileSizeFile size (Number) / Byte
folderNameFolder name (String)
idFile ID (String)
modeTransfer mode (String)
printFileNameDisplayed filename (String)
rootNameFolder name (String)
rowIDFile row index ID (String)
selectedSelected or not (Boolean)
transferTypeTransfer mode (String)
uniqueFileNameUnique file name (String)
uploadUrlUpload URL (String)
downloadUrlDownload URL (String)
sliceSizeFile slice size (Number) / Byte
validateFile validation (Boolean)

5. Get a specific file information

Get detailed information for the file at the index number.

var fileInfo = box.getFileByIndex(0);

(The returned fields are the same as the table in 4. Get all file information.)

6. Set POST Data

Set the POST data for all files identically.

var postObj = new Object();
postObj.type = "t31";
postObj.part = "p25";
box.setPostData(postObj);
box.upload();

Set the POST data for each file 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);
}


STEP2: Back end process

1. Change the upload path

Write code to change the file name uploaded to the server.

directory = "./data/";
InnorixUpload uploader = new InnorixUpload(request, response, maxPostSize, directory);

2. Change the file name

Get all file information after starting the upload.

uploader.setFileName(rename);

3. Get all file information

Get all file information after starting the upload.

String _action = uploader.getParameter("_action");
if(_action.equals("getFileInfo")){ }

NamegetFileInfo
DescriptionWhen the upload starts on the server
Parameter Description
_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

4. Get transfer status

Get the transfer status of each file during upload.

String _action = uploader.getParameter("_action");
if(_action.equals("attachFile")){ }

NameattachFile
DescriptionTransfer status of each file during upload
Parameter Description
_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

5. Save the uploaded information

Save the uploaded file information and form values to the database.

String _action = uploader.getParameter("_action");
if(_action.equals("attachFileCompleted")){ }

NameattachFileComplete
DescriptionIndividual file upload completed
Parameter Description
_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

STEP3: Upload complete

Upload complete event

After all files are uploaded to the server, the front end retrieves the uploaded information from the server.

box.on('uploadComplete', function (p) {
    console.log(p);
});

NameuploadComplete
DescriptionWhen file upload is complete
Parameter Description
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 (string)
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)

Exabyter download

Make the file list

1. Download file URL

The download file URL must start with with http(s):// and be an accessible address.

2. Displayed file name

Even if the actual file name on the server is "a.txt", the actual file name ("a.txt") is displayed unless "The File AAA.txt" is set in the list control.

3. File size (byte)

For better performance, it is recommended to enter the file size. If not set, Exabyter automatically gets the file size.

box.presetDownloadFiles(
[{
    downloadUrl: "http://your web server address/a.txt",
    printFileName: "The File AAA.txt",
    fileSize: 1433885
}]);


Direct or stream download

1. Direct download

The most basic method is simply to 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
}]);

2. Stream download

Stream downloads are used in most enterprise environments in the following cases:

  1. Only logged-in users can download the file.
  2. For security reasons, the actual file path cannot be exposed.
  3. The actual file is stored as a BLOB in the database.
  4. The actual file path cannot be accessed from a web browser (e.g. the actual file is at /usr/local/mount).

Front end example

box.presetDownloadFiles([{
    downloadUrl: "http://your web server address/download.jsp?fileID=1",
    printFileName: "INNORIX Exabyter Brochure.pdf",
    fileSize: 1433885
}]);

Back end example

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 download file information

1. Get all file information

Get the total size of all files in the list control.

var fileInfo = box.getTotalSize();

Get the total number of all files in the list control.

var fileInfo = box.getFileCount();

Get detailed information about all files in the list control.

var fileInfo = box.getAllFiles();

Name Description
basePathAttached path (String)
boxIdList control ID (String)
filePathFull path of the attached file (String)
fileSizeFile size (Number) / Byte
folderNameFolder name (String)
IdFile ID (String)
ModeTransfer mode (String)
printFileNameDisplayed filename (String)
rootNameFolder name (String)
rowIDFile row index ID (String)
selectedSelected or not (Boolean)
transferTypeTransfer mode (String)
uniqueFileNameUnique file name (String)
uploadUrlUpload URL (String)
downloadUrlDownload URL (String)
sliceSizeFile slice size (Number) / Byte
validateFile validation (Boolean)

2. Get a specific file information

Get detailed information for the file at the index number.

var fileInfo = box.getFileByIndex(0);

(The returned fields are the same as the table above 1. Get all file information.)


Advanced features

Monitor & Track

Upload information is sent to Monitor & Track in real time.

Name Type Default Description
monitorURLStringSet the monitor and track server address (INNORIX Platform server)<br>e.g. "http://test.innorix.com/mt/transfer"
innorix.config = {
    default: {
        …
        monitorURL: "http://your monitor server address/mt/transfer",
        …
}};

Integrated mode

Enable both upload and download functions in the same list control.

Name Type Default Description
transferModeStringbothSet the file box transfer mode.<br>both : Upload and download in the same file box<br>upload : Only upload<br>download : Only download
innorix.config = {
    default: {
        …
        transferMode: "both",
        …
}};

HTTPS (SSL) transfer

HTTPS (SSL) Upload

Set the upload server address using "https://"

innorix.config = {
    default: {
        …
        uploadURL : "https://your web server address/upload.jsp",
        …
}};

HTTPS (SSL) Download

Set the download file URL using "https://".

box.presetDownloadFiles([{
    downloadUrl: "https://your web server address/download.jsp?fileID=1",
    …
}]);


Image upload

1. Resize and upload

When uploading an image, a resized image of the specified size is created and uploaded together. (jpg, png, gif, bmp)

NameappendThumbnailProperty()
DescriptionWhen uploading an image, a resized image of the specified size is created and uploaded together. (jpg, png, gif, bmp)
Input parameter# JSON Object<br>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();

2. Add watermark and upload

When uploading an image, a watermark is added to the original and resized images before uploading. (jpg, png, gif, bmp)

NameappendWatermarkProperty()
DescriptionWhen uploading an image, a watermark is added to the original and resized images before uploading. (jpg, png, gif, bmp)
Input parameter# JSON Object<br>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();


Exabyter UI

File box

1. Skin of the file box

Set the style of the file box.

Name Type Default Description
boxSkinStringsimple1Set the file box skin.<br>simple1 : Dot icons is in front of file names<br>simple2 : File type icon is in front of a file names<br>simple3 : Display only file names<br>detail1 : Add to display file types and modified dates on simple1<br>detail2 : Add to display file types and modified dates on simple2<br>detail3 : Add to display file types and modified dates on simple3
innorix.config = {
    default: {
        …
        boxSkin: "simple1",
        …
}};

simple1 (dot icon):

simple2 (file type icon):

simple3 (display filename only):

detail1 / detail2 (add file type and modified date columns):

2. Size of the file box

Set the size of the file box. (pixel)

Name Type Default Description
boxHeightNumber200Set the file box height (pixels)
boxWidthNumber200Set the file box width (pixel)
innorix.config = {
    default: {
        …
        boxHeight: 200,
        boxWidth: 500,
        …
}};

3. Set image preview

Set image preview in the file box.

Name Type Default Description
showPreviewImageBooleanfalsePreview the selected image file in the file box.
innorix.config = {
    default: {
        …
        showPreviewImage: true,
        …
}};

4. Click and double click events

Get file information when clicking or double-clicking.

box.on('onDblClickRows', function (p) {
    console.log(p);
});

NameonDblClickRows
DescriptionWhen double click a file in the file box
Parameter Description
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)

5. Drag and drop

Set whether to use drag and drop.

Name Type Default Description
enableDropZoneBooleantrueActivate the drop zone in the file box.
innorix.config = {
    default: {
        …
        enableDropZone: true,
        …
}};

6. Context menu

Set whether to use the right-click context menu.

Name Type Default Description
useContextMenuBooleantrueActivate the context menu in the file box.
innorix.config = {
    default: {
        …
        useContextMenu: true,
        …
}};


Upload buttons

1. Multi file browse button

NameopenFileDialog()
DescriptionMulti-file attachment dialog
<input type="button" value="Multi file browse button" onclick="box.openFileDialog();"/>

2. Single file browse button

NameopenFileDialogSingle()
DescriptionSingle-file attachment dialog
<input type="button" value="Single file browse button" onclick="box.openFileDialogSingle();"/>

3. Remove the selected files in the file box

NameremoveSelectedFiles()
DescriptionDelete selected files
<input type="button" value="Remove the selected files" onclick="box.removeSelectedFiles();"/>

4. Remove all files in the file box

NameremoveAllFiles()
DescriptionDelete all files in the file box
<input type="button" value="Remove all files" onclick="box.removeAllFiles();"/>

5. Upload button

Nameupload()
DescriptionUpload all files in the file box
<input type="button" value="Upload" onclick="box.upload();"/>


Download buttons

1. Download all files in the file box

Namedownload()
DescriptionDownload all files in the file box
<input type="button" value="Download all files" onclick="box.download();"/>

2. Download the selected files

NamedownloadSelectedFiles()
DescriptionDownload selected files in the file box
<input type="button" value="Download the selected files" onclick="box.downloadSelectedFiles();"/>


Transfer window

1. Display or non-display the transfer window

Set whether to use the transfer window. If "false", the transfer window is not displayed during transfer.

Name Type Default Description
showTransferWindowBooleantrueDisplay transfer window
innorix.config = {
    default: {
        …
        showTransferWindow: true,
        …
}};

2. Display the file list on the transfer window

Name Type Default Description
fileListWindowModeBooleanfalseDisplay file list in the transfer window
innorix.config = {
    default: {
        …
        fileListWindowMode : true,
        …
}};

3. Add to display each file transfer status on the transfer window

Name Type Default Description
fileListWindowStatusBooleanfalseDisplay file list and transfer status in the transfer window
innorix.config = {
    default: {
        …
        fileListWindowStatus : true,
        …
}};


Auto upload & download

1. Auto upload when files are attached

Users can upload automatically without clicking the upload button.

box.on('afterAddFiles', function (p) {
    box.upload();
});

2. Auto download

Users can download automatically without clicking the download button.

box.on('afterAddFiles', function (p) {
    box.download();
});

3. Auto transfer start

Users can start the transfer automatically without clicking the transfer start button in the transfer window.

Name Type Default Description
transferStartJSON Text"upload":"auto",<br>"download":"manual"Users can start the transfer automatically without clicking the transfer start button in the transfer window.<br>e.g { "upload":"auto", "download": "manual" }<br>auto: Starts the transfer along with displaying the transfer window.<br>manual: The user clicks the start button to start the transfer.
innorix.config = {
    default: {
        …
        transferStart: {
            "upload":"auto",
            "download": "manual"
        }
        …
}};


Custom file box

Create a custom drop zone

Configure a custom drag-and-drop area and connect it with 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: '#fileBox',
                    config : innorix.config.default
                });
                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="fileBox"></div><br/>
        <input type="button" value="Multi file browse button" onclick="box.openFileDialog();"/>
        <input type="button" value="Upload" onclick="box.upload();"/>
    </body>
</html>

Multiple upload file boxes

You can configure multiple upload file boxes on a single web page.

<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: '#fileBox1',
                    config : innorix.config.default1
                });
                box2 = innorix.create({
                    el: '#fileBox2',
                    config : innorix.config.default2
                });

                box1.on('uploadComplete', function (p) {
                });
                box2.on('uploadComplete', function (p) {
                });
            };
        </script>
    </head>
    <body>
        <div id="fileBox1"></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="fileBox2"></div><br />
        <input type="button" value="Multi file browse button" onclick="box2.openFileDialog();"/>
        <input type="button" value="Upload" onclick="box2.upload();" />
    </body>
</html>

Multiple download file boxes

You can configure multiple download file boxes on a single page.

<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: '#fileBox1',
                    config : innorix.config.default1
                });
                box2 = innorix.create({
                    el: '#fileBox2',
                    config : innorix.config.default2
                });

                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="fileBox1"></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="fileBox2"></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>


Major options

File box

Name Type Default Description
boxSkinStringsimple1Set the file box style<br>simple1 : Dot icons is in front of file names<br>simple2 : File type icon is in front of a file names<br>simple3 : Display only file names<br>detail1 : Add to display file types and modified dates on simple1<br>detail2 : Add to display file types and modified dates on simple2<br>detail3 : Add to display file types and modified dates on simple3
boxHeightNumber200Set the file box height (pixels)
boxWidthNumber200Set the file box width (pixel)
useContextMenuBooleantrueActivate the right-click context menu
enableDropZoneBooleantrueActivate drag-and-drop file attachment
maxMassFileListCountNumber1000Set the maximum number of file attachments before switching to bulk mode<br>When the number of files is exceeded, it switches to bulk attachment mode.
showPreviewImageBooleanfalseActivate the image file preview area

Transfer

Name Type Default Description
uploadURLStringUpload URL
transferModeStringbothFile box transfer mode<br>both : Upload and download in the same file box<br>upload : Only upload<br>download : Only download
transferStartJSON Text"upload":"auto",<br>"download":"manual"Users can start the transfer automatically without clicking the transfer start button in the transfer window.<br>e.g { "upload":"auto", "download": "manual" }<br>auto: Starts the transfer along with displaying the transfer window.<br>manual: The user clicks the start button to start the transfer.
downloadTypeStringstreamSet the download type<br>direct: http://abc.com/file.dat format<br>stream: http://abc.com/down.jsp?fid=33 format

Transfer window

Name Type Default Description
showTransferWindowBooleantrueActivate display of the transfer window
draggableTransferWindowBooleantrueActivate dragging of the transfer window
transferWindowTitleStringExabyterSet the transfer window title
cancelConfirmationBooleanfalseDisplay a confirmation message when canceling
showByteSizeBooleanfalseEnable automatic calculation of transfer size units
iframeOutsideBooleantrueDisplay the transfer window outside the frame structure
iframeOutsideStringSet the innorix.css URL referenced from the external frame
iframeOutsideLeftNumberHorizontal position of the displayed transfer window relative to the external frame (pixel)
iframeOutsideTopNumberVertical position of the displayed transfer window relative to the external frame (pixel)
iframeOutsideLocationStringSet the frame where the transfer window is displayed<br>top: Display in the top-level frame<br>parent: Display in the immediate parent frame
iframeOutsideMarginLeftNumberSet the horizontal margin relative to the frame when displaying the transfer window (pixel)
iframeOutsideMarginTopNumberSet the vertical margin relative to the frame when displaying the transfer window (pixel)
fileListWindowModeBooleanfalseActivate the file list display function in the transfer window
fileListWindowStatusBooleanfalseActivate file list display and file transfer status display in the transfer window

Attachement

Name Type Default Description
allowTypeString ArrayAllow specific extensions to be attached<br>e.g ["jpg", "gif", "png"]<br>※ denyType is higher priority than allowType
denyTypeString ArrayProhibit specific extensions from being attached<br>e.g ["exe", "msi", "cab"]<br>※ When specifying the same extension policy as allowType, denyType is applied first
useSignatureBooleanfalseEnable protection against extension tampering when attaching files
addDuplicateFileBooleantrueAllow duplicate file names to be attached
maxFileCountNumberunlimitedSet the maximum number of files that can be attached
maxFileSizeNumberunlimitedSet the size of a single file that can be attached (bytes)
maxTotalSizeNumberunlimitedSet the total size of files that can be attached (bytes)

Monitor & Track

Name Type Default Description
monitorURLStringMRT address (INNORIX Platform server)<br>e.g. "http://test.innorix.com/mt/transfer"

Front end methods

Dialog

NameopenFileDialog()
DescriptionMulti-file attachment dialog
Return typeNone (void)
Input parameterNone
NameopenFileDialogSingle()
DescriptionSingle-file attachment dialog
Return typeNone (void)
Input parameterNone

File box

NamepresetDownloadFiles()
Return typeNone (void)
DescriptionConfigure the 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)
}]

NameaddSelectFilesById()
DescriptionSelect a file by file ID in the file box
Return typeNone (void)
Input parameter(String)
NameremoveFileByIndex()
DescriptionDelete the file corresponding to the index in the file box
Return typeNone (void)
Input parameter(Number)
NameremoveFileById()
DescriptionDelete a file by file ID in the file box
Return typeNone (void)
Input parameter(String)
NameremoveSelectedFiles()
DescriptionDelete selected files in the file box
Return typeNone (void)
Input parameterNone
NameremoveAllFiles()
DescriptionDelete all files in the file box
Return typeNone (void)
Input parameterNone
Namedestory()
DescriptionRemove the file box
Return typeNone (void)
Input parameterNone

File information

NamegetAllFiles()
DescriptionView all file information in the file box
Input parameterNone

Return type (# JSON Object):

// Upload file value
[{
    "basePath":"D: \test\vol.7",   // Attached path (String)
    "boxId":"fileBox",             // File box ID (String)
    "filePath":"D:\test\vol.7\Data Centre of Future.ppt",   // Full path of the attached file (String)
    "fileSize":2506093,            // File size (Number) / Byte
    "folderName":"",               // Folder name (String)
    "id":"fda07096-917b-4dde-fe23-bb0114fbe8ad",   // File ID (String)
    "mode":"upload",               // Transfer mode (String)
    "printFileName":"Data Centre of Future.ppt",   // Displayed filename (String)
    "rootName":"",                 // Folder name (String)
    "rowID":"fda07096-917b-4dde-fe23-bb0114fbe8ad",   // File row index ID (String)
    "selected":false,              // Selected or not (Boolean)
    "transferType":"upload",       // Transfer mode (String)
    "uniqueFileName":"950491e5……db6d5529e404.dat",   // Unique file name (String)
    "uploadUrl":"http://localhost/webpages/./upload.jsp"   // Upload URL (String)
}]

// Download file value
[{
    "downloadUrl":"http://localhost/download.jsp?fileID=1",   // Download URL (String)
    "fileSize":1433885,            // File size (Number) / Byte
    "id":"8d6f7747-414e-4ad6-bc84-aa4392edf7d6",   // File ID (String)
    "mode":"download",             // Transfer mode (String)
    "printFileName":"INNORIX.pdf", // Displayed filename (String)
    "rowID":"8d6f7747-414e-4ad6-bc84-aa4392edf7d6",   // File row index ID (String)
    "selected":true,               // Selected or not (Boolean)
    "sliceSize":2097152,           // File slice size (Number) / Byte
    "transferType":"download",     // Transfer mode (String)
    "validate":true                // Validate the file (Boolean)
}]

NamegetSelectedFiles()
DescriptionView information for the selected files in the file box
Return type# JSON Object (Upload / Download file value — Same structure as getAllFiles())
Input parameterNone
NamegetUploadFiles()
DescriptionView information for all upload files in the file box
Return type# JSON Object - Upload file value (Same structure as the Upload structure of getAllFiles())
Input parameterNone
NamegetDownloadFiles()
DescriptionView information for all download files in the file box
Return type# JSON Object - Download file value (Same structure as the Download structure of getAllFiles())
Input parameterNone
NamegetFileCount()
DescriptionGet the number of all files in the file box
Return type(Number)
Input parameterNone
NamegetSelectedFileCount()
DescriptionGet the number of selected files in the file box
Return type(Number)
Input parameterNone
NamegetUploadFileSize()
DescriptionGet the total size of upload files in the file box
Return type(Number)
Input parameterNone
NamegetDownloadFileSize()
DescriptionGet the total size of download files in the file box
Return type(Number)
Input parameterNone
NamegetTotalSize()
DescriptionGet the total size of all files in the file box
Return type(Number)
Input parameterNone
NamegetFileByIndex()
DescriptionGet file information by file index in the file box
Return type# JSON Object (Upload / Download file value — Same structure as getAllFiles())
Input parameter(Number)
NamegetFileById()
DescriptionGet file information by file ID in the file box
Return type# JSON Object (Upload / Download file value — Same structure as getAllFiles())
Input parameter(String)

Transfer

Nameupload()
DescriptionUpload all files in the file box
Return typeNone (void)
Input parameterNone
NameuploadCancel()
DescriptionCancel upload
Return typeNone (void)
Input parameterNone
Namedownload()
DescriptionDownload all files in the file box
Return typeNone (void)
Input parameterNone
NamedownloadSelectedFiles()
DescriptionDownload selected files in the file box
Return typeNone (void)
Input parameterNone
NamesetPostData()
DescriptionAdd custom POST Data to the header
Return typeNone (void)
Input parameter# JSON Object { Name : Value, Name : Value }
NamesetFilePostDataByIndex()
DescriptionAdd custom POST Data to the header by file index
Return typeNone (void)
Input parameter# JSON Object — Index(Number), { Name : Value, Name : Value }
NamesetSize()
DescriptionSet the file box size
Return typeNone (void)
Input parameterWidth(Number), Height(Number)
NamesetCookie()
DescriptionSet the browser session information
Return typeNone (void)
Input parameter(String)

setCookie example — maintain session information after loading the file box:

box.on('loadComplete', function (p) {
    box.setCookie("JSESSIONID=<%=session.getId()%>");
}…

NamegetTransferMode()
DescriptionCheck the current transfer mode of the file box
Return type(String)<br>upload : Upload mode<br>download : Download mode<br>both : Upload and download mode
Input parameterNone
NameappendThumbnailProperty()
DescriptionWhen uploading an image, create a resized image of the specified size and upload it together. (jpg, png, gif, bmp)
Return typeNone (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");

NameappendWatermarkProperty()
DescriptionAdd a watermark to the original and resized images when uploading an image. (jpg, png, gif, bmp)
Return typeNone (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");

Transfer window

NamecloseTransferWindow()
DescriptionClose the transfer window
Return typeNone (void)
Input parameterNone (void)

Back end methods

Upload

NamesetOverwrite()
DescriptionOverwrite files with the same name
Return typeNone (void)
Input parameter(Boolean) – true, false
Namerun()
DescriptionStart upload
Return typeNone (void)
Input parameterNone (void)
NamesetFileName()
DescriptionSet the file name for saving the uploaded file
Return typeNone (void)
Input parameterString
NamesetDirectory()
DescriptionSet the file path for saving the uploaded file
Return typeNone (void)
Input parameterString

Front end events

File box

NameloadComplete
DescriptionFile box creation completed
ParameterNone (void)
NamebeforeAddFile
DescriptionBefore adding files to the file box

Parameter (# JSON Object):

{
    "basePath":"C:\\data",           // Attached path (String)
    "boxId":"fileControl",           // File box ID (String)
    "filePath":"C:\\data\\blue.pdf", // Attached file full path (String)
    "fileSize":9437184,              // File size (Number) / Byte
    "mode":"upload",                 // Transfer mode (String)
    "uploadUrl":"http://{Server}/upload.jsp"   // Upload URL (String)
}

NameafterAddFiles
DescriptionAfter adding files to the file box

Parameter (# JSON Object):

[{
    "basePath":"D:\",              // Attached path (String)
    "boxId":"fileControl",         // File box ID (String)
    "filePath":"D:\Data.ppt",      // Attached file full path (String)
    "fileSize":2506093,            // File size (Number) / Byte
    "folderName":"",               // Folder name (String)
    "id":"fda07096-….114fbe8ad",   // File ID (String)
    "mode":"upload",               // Transfer mode (String)
    "printFileName":"Data.ppt",    // Displayed filename (String)
    "rootName":"",                 // Folder name (String)
    "rowID":"fda070….114fbe8ad",   // File row index ID (String)
    "selected":true,               // Selected or not (Boolean)
    "transferType":"upload",       // Transfer mode (String)
    "uniqueFileName":"950..404.dat",   // Unique file name (String)
    "uploadUrl":"http://{Server}/upload.jsp"   // Upload URL (String)
},{
    "downloadUrl":"http://{Server}/download.jsp?fileID=1",   // Download URL (String)
    "fileSize":1433885,            // File size (Number) / Byte
    "id":"8d6f7747-…92edf7d6",     // File ID (String)
    "mode":"download",             // Transfer mode (String)
    "printFileName":"INNORIX.pdf", // Displayed filename (String)
    "rowID":"8d6f7747-…92edf7d6",  // File row index ID (String)
    "selected":true,               // Selected or not (Boolean)
    "sliceSize":2002,              // Slice size (Number) / Byte
    "transferType":"download",     // Transfer mode (String)
    "validate":true                // Validate the file (Boolean)
}]

NamebeforeRemoveFiles
DescriptionBefore deleting files from the file box
Parameter# JSON Object (Array of file information with the same structure as afterAddFiles)
NameremoveFiles
DescriptionAfter deleting files from the file box
Parameter# JSON Object (Array of file information with the same structure as afterAddFiles)
NameaddFileError
DescriptionWhen an error occurs while attaching files to the file box

Parameter (# JSON Object):

[{
    "basePath":"D:\",              // Attached path (String)
    "boxId":"fileControl",         // File box ID (String)
    "filePath":"D:\Data.ppt",      // Attached file full path (String)
    "fileSize":2506093,            // File size (Number) / Byte
    "mode":"upload",               // Transfer mode (String)
    "uploadUrl":"http://{Server}/upload.jsp"   // 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"
]

NameonSelectRows
DescriptionWhen selecting files in the file box
Parameter# JSON Object (Array of file information with the same structure as afterAddFiles)
NameonUnSelectRows
DescriptionWhen deselecting files in the file box
Parameter# JSON Object (Array of file information with the same structure as afterAddFiles)
NameonDblClickRows
DescriptionWhen double-clicking a file in the file box
Parameter# JSON Object (Array of file information with the same structure as afterAddFiles)
NamedropzoneShow
DescriptionWhen drag and drop is enabled
Parameter
NamedropzoneHide
DescriptionWhen drag and drop is disabled
Parameter

Transfer

NameuploadStart
DescriptionStart upload

Parameter (# JSON Object):

{
    "files":[{                     // Upload file info (Array)
        "basePath":"D:\",          // Attached path (String)
        "boxId":"fileControl",     // File box ID (String)
        "filePath":"D:\Data.ppt",  // Attached file full path (String)
        "fileSize":2506093,        // File size (Number) / Byte
        "folderName":"",           // Folder name (String)
        "id":"fda07096-….114fbe8ad",   // File ID (String)
        "mode":"upload",           // Transfer mode (String)
        "printFileName":"Data.ppt",    // Displayed filename (String)
        "rootName":"",             // Folder name (String)
        "rowID":"fda070….114fbe8ad",   // File row index ID (String)
        "selected":false,          // Selected or not (Boolean)
        "transferType":"upload",   // Transfer mode (String)
        "uniqueFileName":"950..404.dat",   // Unique file name (String)
        "uploadUrl":"http://{Server}/upload.jsp"   // Upload URL (String)
    }],
    "progress":0,                  // Progress (Number) / %
    "retries":0,                   // Retry count (Number) / Times
    "speed":0,                     // Transfer speed (Number) / Byte/s
    "state":"Before",              // Status (String)
    "totalSize":2506093,           // Total size (Number) / Byte
    "transferID":"d77-…29d",       // Transfer ID (String)
    "transferSize":0,              // Transfer size (Number) / Byte
    "type":"upload"                // Transfer mode (String)
}

NameuploadComplete
DescriptionUpload complete
Parameter# JSON Object (Same structure as uploadStart)
NameuploadCancel
DescriptionUpload canceled

Parameter (# JSON Object):

{
    "files":[{                     // Upload file info (Array)
        "clientFileName":"Data.ppt",       // Displayed filename (String)
        "clientFilePath":"D:\Data.ppt",    // Attached file full path (String)
        "boxId":"fileControl",             // File box ID (String)
        "basePath":"D:\",                  // Attached path (String)
        "customeValue":"",                 // Customized value (String)
        "fileSize":2506093,                // File size (Number) / Byte
        "folderName":"",                   // Folder name (String)
        "fileState":"wait",                // Transfer status (String)
        "isFolder":false,                  // Folder information (Boolean)
        "rootName":"",                     // Folder name (String)
        "rowID":"fda070….114fbe8ad",       // File row index ID (String)
        "serverFileName":"Data.dat",       // Save file name (string)
        "serverFilePath":"C:/{Server}/Data.dat",   // Save folder path (String)
        "uploadUrl":"http://{Server}/upload.jsp"   // Upload URL (String)
    }],
    "progress":20,                 // Progress (Number) / %
    "retries":0,                   // Retry count (Number)
    "speed":8584793,               // Transfer speed (Number) / Byte/s
    "state":"Cancel",              // Status (String)
    "stausMessage":{               // Status (Object)
        "errorCode":false,         // Error code (Boolean/String)
        "id":"trnasferring"        // Transfer status (String)
    },
    "totalSize":2506093,           // Total size (Number) / Byte
    "transferID":"d77-…29d",       // Transfer ID (String)
    "transferSize":1203022,        // Transfer size (Number) / Byte
    "type":"upload"                // Transfer mode (String)
}

NamedownloadStart
DescriptionStart download

Parameter (# JSON Object):

{
    "files":[{                     // Download file info (Array)
        "downloadUrl":"http://{Server}/download.jsp?fileID=1",   // Download URL (String)
        "fileSize":1433885,        // File size (Number) / Byte
        "id":"8d6f7747-…92edf7d6", // File ID (String)
        "mode":"download",         // Transfer mode (String)
        "printFileName":"INNORIX.pdf",     // Displayed filename (String)
        "rowID":"8d6f7747-…92edf7d6",      // File row index ID (String)
        "selected":false,          // Selected or not (Boolean)
        "sliceSize":2097152,       // Slice size (Number) / Byte
        "transferType":"download", // Transfer mode (String)
        "validate":true            // Validate the file (Boolean)
    }],
    "progress":0,                  // Progress (Number) / %
    "retries":0,                   // Retry count (Number) / Times
    "speed":0,                     // Transfer speed (Number) / Byte/s
    "state":"Before",              // Status (String)
    "totalSize":1433885,           // Total size (Number) / Byte
    "transferID":"d77-…29d",       // Transfer ID (String)
    "transferSize":0,              // Transfer size (Number) / Byte
    "type":"download"              // Transfer mode (String)
}


Back end events

Upload

NamegetFileInfo
DescriptionGet file information before upload on the server
Parameter Description
_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
NameattachFile
DescriptionIndividual file transfer in progress on the server
Parameter Description
_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
NameattachFileComplete
DescriptionWhen individual file transfer is complete on the server
Parameter Description
_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