Applying new port number.
to navigation to content

INNORIX Platform

48 GB Free
48 GB free in your server storage.
Language

WP Manual

Uploaded file infomation

Uploaded file information by WP is automatically inserted into INNORIX server DB as follows.

<script>
  objectName.on('uploadComplete', function (param) {
      console.log('uploadComplete: ', param);
  });
<script>

Return value

Object.transferID String Transfer ID
Object.totalSize Number Total file size
Object.files[n].fileID String File ID
Object.files[n].clientFileName String Origianl Filename
Object.files[n].clientFilePath String Local Path
Object.files[n].fileSize Number File size

Load file infomation

When creating a download file list in WP, if you input only the Transfer ID, WP automatically loads file information
such as filename, size and etc. from INNORIX server DB and creates the download list.

innorix.server.getTransfer(control, transferId) → {JSON}

Return value

[
    {
        "serverHost" : "http://173.30.1.35:80",
        "serverId" : "INNORIX Server",
        "serverGroupID" : "INNORIX Server Group",
        "serverLatitude" : 37,
        "serverLongitude" : 126,
        "fileSize" : 17717,
        "printFileName" : "INNORIX Platform Brochure.pdf",
        "downloadUrl" : "http://173.30.1.35:80/wpdownload?t=0b4da8dd...&f=de19a8a8...",
        ...
    }
]


How to create the WP upload mode

<!-- Include innorix.css and innorix.js (the WP Javascirpt API) in your web page. -->
<link rel="stylesheet" href="http://installed_innorix_server_address:port/innorix.css">
<script src="http://installed_innorix_server_address:port/innorix.js"></script>

<div id="fileControl"></div><br />

<script>
    // With innorix.create, create the parameters for WP control and set the property value.
    var control = innorix.create({
        el : '#fileControl', // Control ID
        width : 550, // Control width [pixel]
        height : 200 // Control height [pixel]
    });

    // You can insert uploaded file information into your DB.
    control.on('uploadComplete', function (param) {

        console.log('uploadComplete: ', param);
        /*
        Uploaded file information will be automatically saved
        into the INNORIX server DB and returned through param.

        Make codes to insert uploaded file information of param into your DB.
        */
    });
</script>

<!-- Upload buttons -->
<input type="button" value="Add Files" onclick="control.openFileDialog();" />
<input type="button" value=”Upload" onclick="control.upload();" />


How to create the WP download mode

<!-- Include innorix.css and innorix.js (the WP Javascirpt API) in your web page. -->
<link rel="stylesheet" href="http://installed_innorix_server_address:port/innorix.css">
<script src="http://installed_innorix_server_address:port/innorix.js"></script>

<div id="fileControl"></div><br />

<script>
    // With innorix.create, create the parameters for WP control and set the property value.
    var control = innorix.create({
        el : '#fileControl', // Control ID
        width : 550, // Control width [pixel]
        height : 200 // Control height [pixel]
    });

    control.on('loadComplete', function (param) {
        // Create download file list
        innorix.server.setDownloadFilesByTransferId(control, "0b4da8dd…");
    });
</script>

<!-- Download buttons -->
<input type="button" value="Download Selected" onclick="control.downloadSelectedFiles();" />
<input type="button" value="Download All" onclick="control.download();" />

Developer’s Reference


Property

Code example

<script>
    var control = innorix.create({
        el : '#fileControl', // Control ID
        width : 550, // Control width [pixel]
        height : 200 // Control height [pixel]
        …
});
Property Types Description Default
el String Control ID
width Number Control height [pixel]
height Number Control width [pixel]
limitExtension String Array Denying file types
e.g. ["exe", "msi", "cab"]
allowExtension String Array Allowing file types
e.g. ["txt", "doc", "xls"]
addDuplicateFile Boolean Allowing duplicate file attachment true
maxFileCount Number Limit maximum total number of files unlimited
maxFileSize Number Limit maximum single file size [byte] unlimited
maxTotalSize Number Limit maximum total file size [byte] unlimited


downloadType


String
Download mode

direct:
http://www.abc.com/data/file.dat
stream:
http://www.abc.com/down.jsp?id=32


stream
useCrypt Boolean useCrypt Boolean Enable secure transfer mode false false
limitRate Number limitRate Number Maximum transfer speed [byte/sec]

Method

Code example

<script>
    var control = innorix.create({
    ...
    ...
</script>

<input type="button" value="Upload" onclick="control.upload();" />

File transfer

Method Description
upload() Starting upload
download() Starting download
downloadAndOpen() Opening a user selected file in user computer right after downloading
downloadSelectedFiles() Downloading user selected files
estimateTiime(callback) Estimated transfer time

ControlBox

Method Description
openFileDialog() Opening a file dialog
openFolderDialog() Opening a folder dialog
getAllFiles() All file information
getSelectedFiles() Selected file information
getFileCount() All file Count
getFileById(id) File information of the file ID
getFileByIndex(index) File information of the file index
removeAllFiles() Removing all file information in the control
removeSelectedFiles() Removing user selected file information
removeFileById(id) Removing the file of file ID
removeFileByIndex(index) Removing the file of file index
setSize(width, height) Object resize
destroy() Remove control

Server-side file information

Method Description
innorix.server.getTransfer(transferID) Load file information
innorix.server.setDownloadFilesByTransferId(object, transferId) File list automatically create


Event

Code example

<script>
control.on('uploadComplete', function (param) {
    console.log('uploadComplete: ', param);
});
</script>


ControlBox event

Event name Description
loadComplete Loading complete
beforeAddFile Right before adding files
afterAddFiles Right after adding files
addFileError Error adding files
onSelectRows Rows selected
onUnSelectRows Rows unselected
onDestroy Object destroy

Upload event

Event name Description
uploadStart Starting upload
uploadComplete Upload complete
uploadCancel Upload cancel
uploadError Upload error
uploadPause Upload pause
uploadResume Upload resume
uploadProgress Upload progress
uploadRetry Upload retry

Download event

Event name Parameters
downloadStart Starting download
downloadComplete Download complete
downloadCancel Download cancel
downloadError Download error
downloadPause Download pause
downloadResume Download resume
downloadProgress Download progress
downloadRetry Download retry
changeDownloadPath Change download path
System Message
It can not be changed in Live Demo.
if (!empty($subMenuActive) && !empty($menuActive)) { $testActive = function ($sub) use ($subMenuActive, $menuActive) { return $sub === $menuActive . '/' . $subMenuActive ? 'on' : 'off'; }; } else { $testActive = function () { return ''; }; }