Home
What's New

User Manual
Object Reference
XUpload
XDownload
SelectedFile

Live Demos
Support

Download & Buy

Other Products
Contact Us


SelectedFile Object XUpload Object XDownload Object

Properties Methods Events
CanRemove
CanSelectFolder
DestinationN
Directory
DownloadedFiles
International
Password
RedirectTarget
RedirectURL
RegKey
SelectedFiles
ShowProgress
SourceN
TotalBytes
TotalSeconds
Username
WarnOverwrite
AddFile
Download
Remove
RemoveAll
RemoveHighlighted
SelectFolder
Stop
ToUTF8
Done
DownloadProgress
Error
SelectFolder
Stop
XDownload Properties
CanRemove As Boolean (Read/Write)
Enables the user to remove items from the list. If set to True, the pop-up menu receives an additional item, Remove. False by default.

Usage: <PARAM NAME="CanRemove" VALUE="True">

Relevant User Manual Section: 2.1.

CanSelectFolder As Boolean (Read/Write)
Enables the user to change the destination folder for all files on the list. If set to True, the pop-up menu receives an additional item, Select Folder. False by default.

Usage: <PARAM NAME="CanSelectFolder" VALUE="True">

Relevant User Manual Section: 6.4.

DestinationN As String (Write-only)
Specifies the destination path for a download item. Works together with the SourceN property. The value may begin with a @-prepended keyword designating a personal user directory such as @DESKTOP or @PERSONAL.

This property can only be set via a <PARAM> tag. To specify a download item programmatically via script, use the method AddFile.

Usage: <PARAM NAME="Destination1" VALUE="c:\file.ext">

Relevant User Manual Sections: 6.1, 3.1.

Directory As String (Read/Write)
Specifies the initial directory for the Select Folder dialog box. Used only if CanSelectFolder is set to True. This property also accepts special @-prefixed keywords designating personal user folders such as @PERSONAL, @DESKTOP, etc.

Usage: <PARAM NAME="Directory" VALUE="c:\myfiles">

<PARAM NAME="Directory" VALUE="@PERSONAL\My Music">

Relevant User Manual Sections: 6.4, 3.1.

DownloadedFiles As Object (Read-only)
Returns a collection of SelectedFile objects representing the download status of each item on the list. SelectedFile's pertinent properties: Index, Path, URL, Size, DownloadStatus and DownloadSuccess.

Usage: For Each File in DownloadCtl.DownloadedFiles...Next

Relevant User Manual Section: 6.2.

International As String (Read/Write)
Specifies a Base64-encoded data block which contains all text strings used by XUpload and XDownload (menu items, captions and user messages) in a foreign language. This data block is to be obtained at http://support.persits.com/xupload/international.aspx. When this property is specified, all XUpload text strings are replaced by the ones contained in the data block.

Usage: <PARAM NAME="International" VALUE="data block">

Relevant User Manual Section: 5.2.

Password As String (Read/Write)
Specifies the default password in case basic authentication is enabled on the server. Used together with the Username property.

Usage: <PARAM NAME="Password" VALUE="xxxxxx">

Relevant User Manual Section: 6.4.

RedirectTarget As String (Read/Write)
Specifies the target window or frame for the redirect URL to appear in. If this property is not specified, the URL will appear in the same window or frame as the XUpload control. Valid values are:
  • _blank: load the URL into a new unnamed window;
  • _parent: load the URL into the immediate parent of the document the XUpload control is in;
  • _self: load the URL into the same window the XUpload control is in;
  • _top: load the URL into the full body of the current window;
  • <window_name>: load the URL into a named HTML frame. If no frame or window exists that matches the specified target name, a new window is opened.

Usage: <PARAM NAME="RedirectTarget" VALUE="_blank">

Relevant User Manual Section: 6.3.

RedirectURL As String (Read/Write)
Specifies a URL XDownload will redirect the browser to upon the completion of a download. If this property is specified, XDownload will POST to the specified URL the results of the download via the form variables URL, Path, Size, Status, and Success.

Usage: <PARAM NAME="RedirectURL" VALUE="http://www.server.com/showresults.asp">

Relevant User Manual Section: 6.3.

RegKey As String (Read/Write)
Specifies the registration key which turns an evaluation version of XUpload and XDownload into a full version.

Usage: <PARAM NAME="RegKey" VALUE="BrxCnX4zjzkh4...ZKMndJBcawbRwA+jq">

Relevant User Manual Section: 1.5.

SelectedFiles As Object (Read-only)
Returns a collection of SelectedFile objects representing the items currently on the list. SelectedFile's pertinent properties: Index, Path, URL, and Selected.

Usage: For Each File in DownloadCtl.SelectedFiles...Next

Relevant User Manual Section: 6.2.

ShowProgress As Boolean (Read/Write)
Specifies whether the progress bar should be displayed during a download. True by default.

Usage: <PARAM NAME="ShowProgress" VALUE="False">

Relevant User Manual Section: 6.4.

SourceN As String (Write-only)
Specifies the source URL for a download item. Works together with the DestinationN property.

This property can only be set via a <PARAM> tag. To specify a download item programmatically via script, use the method AddFile.

Usage: <PARAM NAME="Source1" VALUE="http://www.server.com/file.ext">

Relevant User Manual Section: 6.1

TotalBytes As Long (Read-only)
Returns the total number of bytes transferred during the last download.

Usage: MsgBox DownloadCtl.TotalBytes

TotalSeconds As Double (Read-only)
Returns the duration (in seconds) of the last download.

Usage: MsgBox DownloadCtl.TotalSeconds

Username As String (Read/Write)
Specifies the default username in case basic authentication is enabled on the server. Used together with the Password property.

Usage: <PARAM NAME="Username" VALUE="Administrator">

Relevant User Manual Section: 6.4.

WarnOverwrite As Boolean (Read/Write)
Specifies whether XDownload should display a warning message before a download starts, in case one or more destination paths on the list point to existing files on the user's hard drive. True by default.

Usage: <PARAM NAME="WarnOverwrite" VALUE="False">

Relevant User Manual Section: 6.4.

XDownload Methods
Sub AddFile (Source As String, Destination As String)
Adds an item to the XDownload list. Source is a URL, Destination is a local path.

Usage: DownloadCtl.AddFile "http://server.com/file.ext", "c:\path\file.ext"

Sub Download ( )
Starts a download. Has the same effect as choosing Download from the pop-up menu.

Usage: DownloadCtl.Download

Sub Remove ( Index As Short )
Removes an item from the list specified by a 1-based Index.

Usage: DownloadCtl.Remove 3

Sub RemoveAll ( )
Clears the file list.

Usage: DownloadCtl.RemoveAll

Sub RemoveHighlighted ( )
Causes all highlighted items on the file list to be removed.

Usage: DownloadCtl.RemoveHighlighted

Sub SelectFolder ( )
Shows the Select Folder dialog box. Has the same effect as choosing Select Folder from the pop-up menu.

Usage: DownloadCtl.SelectFolder

Sub Stop ( )
Programmatically stops a download. Has the same effect as clicking Stop on the progress bar.

Usage: DownloadCtl.Stop

Function ToUTF8 ( Text As String ) As Variant
Converts a Text string from Unicode to UTF-8. Returns a binary array of bytes representing the UTF-8 encoded string. To be used to programmatically populate the XDownload control with file names containing Unicode characters.

Usage: Response.BinaryWrite XUpload.ToUTF8( name )

Relevant User Manual Section: 6.5.

XDownload Events
Sub Done ( )
Fires when a download finishes.

Relevant User Manual Section: 6.2.

Sub DownloadProgress (FilePercent As Short, OverallPercent As Short)
Fires multiple times throughout an upload to track progress. FilePercent is an integer between 0 and 100 that specifies the progress of an individual file. OverallPercent is an integer between 0 and 100 that specifies the overall progress.

Relevant User Manual Section: 6.4.

Sub Error (URL As String, Path As String, Error As String)
Fires when an error occurs during an upload. URL and Path identify the item on the list that caused the error, Error specifies the error message itself.
Sub SelectFolder ( Folder As String )
Fires when the user selects a new destination folder. Folder specifies the new user-selected folder.

This event was introduced in version 3.2.

Sub Stop ( )
Fires when a download is interrupted by the user.

SelectedFile Object XUpload Object 

Home
Copyright © 1998 - 2010 Persits Software, Inc.
All Rights Reserved.
XUpload™ is a trademark of Persits Software, Inc.