Get total size of selection in JavaScript callback

Enhanced frontend add-on to queue files.
Post Reply
User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Get total size of selection in JavaScript callback

Post by support »

JBatchUpload can return amount of files selected and total size in a JavaScript callback.
To enable this feature:
1 - Uncomment the following line in i18n_pane.properties

Code: Select all

#js.notification.selection=JSSelectionInfo
2 - Install JSAPI and plug JBatchUpload to applet_http_jsapi.js
You need to add batchui.jar to all ARCHIVE parameters.
You also need to add JBatchUpload parameters such as transferui, transferuiresources ...
http://www.jfileupload.com/products/tools/index.html

3 - Add the following JavaScript function into applet_http_jsapi.html:

Code: Select all

function JSSelectionInfo(amount, size)
{
    // You have amount of files selected and full size in parameters.
}

Post Reply