ssCore.FTP.setNotify

Tell SWF Studio about an FTP.transfer event that you'd like to receive notifications for.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

event - The name of the event you want notification enabled for. Valid values include: onProgress.


Output Parameters:

result - Notification data for the specified event (see description of events for more detail).


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.FTP.setNotify( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.FTP.setNotify( paramsObject );


Notes:

None.


Events:

name - onProgress
type - periodic
result - "bytes_transferred"

During an FTP.transfer, the plugin periodically sends the number of bytes transferred. The frequency of these notifications is a factor of the transfer buffer size, as set in FTP.bufferSize.

ssCore.FTP.setNotify({event:"onProgress"}, {callback:onFTPProgress});

function onFTPProgress(ret_obj, cb_obj, err_obj)
{
    if (ret_obj.success)
    {
        ssDebug.trace("total bytes transferred: " + ret_obj.result);
    }
}