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.
Set the file types that are not allowed to be attached.
Name Type Default Description
denyType
String Array
Deny to attach entered file types<br>e.g ["exe", "msi", "cab"]<br>※ When specifying the same extension policy as allowExtension, LimitExtension is applied first
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);
});
Name
uploadComplete
Description
When 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:
Only logged-in users can download the file.
For security reasons, the actual file path cannot be exposed.
The actual file is stored as a BLOB in the database.
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
basePath
Attached path (String)
boxId
List control 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
File validation (Boolean)
2. Get a specific file information
Get detailed information for the file at the index number.
Set 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
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
transferStart
JSON 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.
Set 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
boxHeight
Number
200
Set the file box height (pixels)
boxWidth
Number
200
Set the file box width (pixel)
useContextMenu
Boolean
true
Activate the right-click context menu
enableDropZone
Boolean
true
Activate drag-and-drop file attachment
maxMassFileListCount
Number
1000
Set 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.
showPreviewImage
Boolean
false
Activate the image file preview area
Transfer
Name Type Default Description
uploadURL
String
Upload URL
transferMode
String
both
File box transfer mode<br>both : Upload and download in the same file box<br>upload : Only upload<br>download : Only download
transferStart
JSON 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.
downloadType
String
stream
Set 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
showTransferWindow
Boolean
true
Activate display of the transfer window
draggableTransferWindow
Boolean
true
Activate dragging of the transfer window
transferWindowTitle
String
Exabyter
Set the transfer window title
cancelConfirmation
Boolean
false
Display a confirmation message when canceling
showByteSize
Boolean
false
Enable automatic calculation of transfer size units
iframeOutside
Boolean
true
Display the transfer window outside the frame structure
iframeOutside
String
Set the innorix.css URL referenced from the external frame
iframeOutsideLeft
Number
Horizontal position of the displayed transfer window relative to the external frame (pixel)
iframeOutsideTop
Number
Vertical position of the displayed transfer window relative to the external frame (pixel)
iframeOutsideLocation
String
Set the frame where the transfer window is displayed<br>top: Display in the top-level frame<br>parent: Display in the immediate parent frame
iframeOutsideMarginLeft
Number
Set the horizontal margin relative to the frame when displaying the transfer window (pixel)
iframeOutsideMarginTop
Number
Set the vertical margin relative to the frame when displaying the transfer window (pixel)
fileListWindowMode
Boolean
false
Activate the file list display function in the transfer window
fileListWindowStatus
Boolean
false
Activate file list display and file transfer status display in the transfer window
Attachement
Name Type Default Description
allowType
String Array
Allow specific extensions to be attached<br>e.g ["jpg", "gif", "png"]<br>※ denyType is higher priority than allowType
denyType
String Array
Prohibit specific extensions from being attached<br>e.g ["exe", "msi", "cab"]<br>※ When specifying the same extension policy as allowType, denyType is applied first
useSignature
Boolean
false
Enable protection against extension tampering when attaching files
addDuplicateFile
Boolean
true
Allow duplicate file names to be attached
maxFileCount
Number
unlimited
Set the maximum number of files that can be attached
maxFileSize
Number
unlimited
Set the size of a single file that can be attached (bytes)
maxTotalSize
Number
unlimited
Set the total size of files that can be attached (bytes)
[{
"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)
}]
Name
beforeRemoveFiles
Description
Before deleting files from the file box
Parameter
# JSON Object (Array of file information with the same structure as afterAddFiles)
Name
removeFiles
Description
After deleting files from the file box
Parameter
# JSON Object (Array of file information with the same structure as afterAddFiles)
Name
addFileError
Description
When 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"
]
Name
onSelectRows
Description
When selecting files in the file box
Parameter
# JSON Object (Array of file information with the same structure as afterAddFiles)
Name
onUnSelectRows
Description
When deselecting files in the file box
Parameter
# JSON Object (Array of file information with the same structure as afterAddFiles)
Name
onDblClickRows
Description
When double-clicking a file in the file box
Parameter
# JSON Object (Array of file information with the same structure as afterAddFiles)
Name
dropzoneShow
Description
When drag and drop is enabled
Parameter
Name
dropzoneHide
Description
When drag and drop is disabled
Parameter
Transfer
Name
uploadStart
Description
Start 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)
}
Name
uploadComplete
Description
Upload complete
Parameter
# JSON Object (Same structure as uploadStart)
Name
uploadCancel
Description
Upload 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)
}
Name
downloadStart
Description
Start 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
Name
getFileInfo
Description
Get 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
Name
attachFile
Description
Individual 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
Name
attachFileComplete
Description
When individual file transfer is complete on the server