# Download Object The Download object controls a single download. Members Table The following table lists the members provided by the Download object.
Members
Properties | Description
BytesDownloaded | Number of bytes currently downloaded.
DownloadSize | Size of the file.
DownloadURL | URL of the file.
ErrorCode | Error code of the download.
FileName | Name of the file.
Flags | Flags of the download.
ID | ID of the download.
Status | Current status.
Methods | Description
Abort | Aborts the download.
Pause | Pauses the download.
Resume | Resumes the download.
Start | Starts the download.
Events | Description
OnProgress | Fires when the progress changed.
OnStatusChanged | Fires when the status changed.
OnViewerOpened | Fires if a viewer program has been started.
Remarks This object is available through the Item method, the CreateDownload method, the OnNewDownload event and the OnRemoveDownload event. Use the Download object to control a single download or to receive information about it. Note that the path of a file using SiteKiosk objects must be allowed in the SiteKiosk configuration (Security -> Access -> URL's With Script Permission) if it is not a browser skin file. Examples The following example shows the name of the file every time a new download started.
    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    SiteKiosk.Network.Downloads.OnNewDownload = OnNewDownload;
    function OnNewDownload(newdownload)
    {
       alert(newdownload.DownloadURL + " will be downloaded");
    }
    </SCRIPT>
Applies to SiteKiosk v5.5 (and later versions). Back to top