ActiveXPowUpload 1.2.0.5
Properties |
![]() ![]() |
All properties with write access ({set [/get]}) can be setted using 2 methods:
1. Inside <OBJECT>...</OBJECT> tag as in the following HTML code:
<param name="EnableFilesList" value="false" />
2. or using JavaScript Code like:
ActiveXPowUpload.EnableFilesList=false;
Please keep in mind that if JavaScript not enabled at user browser then second method won't work. So use the first method if there are no reasons to use the second.
Properties with read only access can be used only at JavaScript.
ShowUploadProgressWindow property
ShowWhenStartUploadProgressWindow property
HideWhenStopUploadProgressWindow property
EnableEmbProgressWindow property
ShowUploadEmbProgressWindow property
ShowWhenStartUploadEmbProgressWindow property
HideWhenStopUploadEmbProgressWindow property
EnableUploadControlBorder property
EnableUploadBackColor property
EnableUploadBackImage property
UploadBackImageHeight property
UploadBackImageDownloadState property
UploadFocusedItemNumber property
DefaultDownloadFolder property
EnableDownloadEmbProgressWindow property
ShowDownloadEmbProgressWindow property
ShowWhenStartDownloadEmbProgressWindow property
HideWhenStopDownloadEmbProgressWindow property
EnableDownloadProgressWindow property
ShowDownloadProgressWindow property
ShowWhenStartDownloadProgressWindow property
HideWhenStopDownloadProgressWindow property
AllowDeleteFilesToDownload property
AllowSwitchOperationModeAtMenu property
UseTrustedSitesDatabase property
String Server {set/get}
Server host name or IP address.
Host name or server IP address where to upload files. Don't specify protocol, port or script path here! Use SSL property for SSL support, Port property to set HTTP Port and Script property to set file processing script path.
See also: UploadURL, Server, Script, Port, SSL properties.
ActiveXPowUpload.Server="localhost"; ActiveXPowUpload.Server="www.somehost.com"; ActiveXPowUpload.Server="127.0.0.1";
String Script {set/get}
Path to a file processing script.
The server script configured to handle uploads and save files at the server. Don't specify full URL here! Concatenation of Server and Script properties should be URL without protocol. You can find ASP, ASP.NET, PHP, PERL, JSP samples of file processing scripts at the FileProcessingScripts\ folder.
See also: UploadURL, Server, Script, Port, SSL properties.
ActiveXPowUpload.Script="/scripts/proccessfiles.asp"; ActiveXPowUpload.Script="/savefiles.aspx?getparam=value"; //You can pass GET parameters to the script
Long Port {set/get}
Server HTTP Port.
HTTP port of the web server. 0 means use default port. 80 for plain HTTP, 443 for HTTPS (If SSL property is true). Default value is 0.
See also: UploadURL, Server, Script, Port, SSL properties.
ActiveXPowUpload.Port=8080;
Boolean SSL {set/get}
Determines if secure SSL (HTTPS) connection should be used.
Determines if secure SSL (HTTPS) connection should be used while sending files to server. Web server should be setup to accept SSL connections.
See also: UploadURL, Server, Script, Port, SSL properties.
ActiveXPowUpload.SSL=true;
String UploadURL {set/get}
Determines a URL where the component sends files and text fields.
ActiveXPowUpload has a conceptual object representing the URL where upload files and text fields will be sent. We name it the Upload URL object. The Upload URL object can be accessed a number of ways. The UploadURL property provides the simplest one, you set URL in one property. There are Server, Script, Port, SSL properties that allow to change parts of the Upload URL object independently. As long as they all set the same object, changing the UploadURL property effects the Server, Script, Port, SSL properties, and changing the Port property, for example, effects the UploadURL property.
UploadURL may be a relative URL. It may be blank (empty string), which means that the upload URL is not specified. On the other hand, if not blank, the upload URL may not resolve to a blank URL, for example, "././." is not allowed.
An empty string has special meaning. If you assign an empty string to the UploadURL property, the properties are cleared. Server, Script become an empty strings, Port - 0, SSL - false. On the other side, having UploadURL equal to the empty string does not always mean that all properties are cleared. UploadURL is an empty string if Server is empty.
For the UploadURL property being used in the script it is always clear that UploadURL overwrites the values set earlier with the Server, Script, Port, SSL properties. For example:
<script language="jscript"> ActiveXPowUpload.Server = "server_1.com"; ActiveXPowUpload.Script = "dir_1/main.php"; ActiveXPowUpload.Port = "8080"; ActiveXPowUpload.UploadURL = "http://server_2.org/dir_2/second.php"; /* Here Server = "server_2.org", Script = "/dir_2/second.php", Port = 0, SSL = false */ </script>
UploadURL used as parameter inside an object html tag takes precedence over all other parameters. The order of parameters inside the object tag does not matter. UploadURL always wins if it is set. For example:
<OBJECT id="ActiveXPowUpload" CLASSID="CLSID:FB98CEED-9DE1-4517-B30C-CDA19C6D150B"> <PARAM name="UploadURL" value="http://www.somehost.com/dir1/dir2/a.html"> <PARAM name="Server" value="myserver.org"> <PARAM name="Script" value="index.asp"> </OBJECT> <!-- Here UploadURL still "http://www.somehost.com/dir1/dir2/a.html" -->
Actually, using UploadURL and any one of Server, Script, Port, SSL as parameters at the same time is meaningless.
See also: UploadURL, Server, Script, Port, SSL properties.
ActiveXPowUpload.UploadURL="http://someserver.com/dir/script.php";
String Agent {set/get}
User-Agent HTTP header's value
User-Agent HTTP header's value contains information on Browser and OS installed at the user side. This property allows to set any custom value. Default value is that which Internet Explorer sends.
ActiveXPowUpload.Agent="Mozilla/4.0 (compatible; MSIE 6.0)";
String UserName {set}
User name if remote server requires authentication.
If remote server which handles files requires authentication you can set a user name and password. Authentication in this case will work automaticaly. If the name and password are not specifed at these parameters user will see a standard dialog and need to enter credentials. Setting name and password at a webpage is not secure in most cases! Use this feature only if you sure that it is safe! Otherwise leave this property blank. If the user passed authentication while opening a web page, he doesn't need to enter credentials the second time and this property should be empty.
Applies to upload mode only.
"" (blank)
ActiveXPowUpload.UserName="gdoe"; ActiveXPowUpload.UserPassword="mypassword";
Strng UserPassword {set}
User password if remote server requires authentication.
Applies to upload mode only.
See UserName property.
"" (blank)
Long MaxFileCount {set/get}
Maximum number of files allowed to add to the file list.
Maximum number of files allowed to add to list and upload (folders are not counted). Default value is 0 (unlimited).
ActiveXPowUpload.MaxFileCount=10;
Long MaxFileSize {set/get}
Maximum size of a file allowed to add to the file list
Maximum size of file allowed to add to list and upload, in bytes. The maximum allowed value is 2147483648 (2 Gb). Default value is 0 (Unlimited but less than 2 GB)
ActiveXPowUpload.MaxFileSize=10*1024*1024; //10Mb quota
Long MaxTotalSize {set/get}
Maximum total size of files allowed to add to the file list
Maximum total size of a files allowed to add to list and upload, in bytes. The maximum allowed value is 2147483648 (2 Gb). Default value is 0 (Unlimited but less than 2 GB)
ActiveXPowUpload.MaxTotalSize=(1024*1024*1024)-1000; //1GB minus 1000 bytes (space for header data) quota.
String Filter {set/get}
File type filters for the "Browse files" dialog.
File type filters for the "Browse files" dialog in a form of a list of pairs separated by the pipe character '|'. Each pair specifies the verbal description of a filter and the filter itself as a list of semicolon-separated (';') wildcards. Use ProhibitExtensions property to absolutly prohibit some extensions.
ActiveXPowUpload.Filter="Images (.gif;.jpg;.bmp;.png)|*.gif;*.jpg;*bmp;*png|Text files (.txt;.doc)|*.txt;*.doc|All Files|*.*";
String AllowExtensions {set/get}
Specifies a comma-separated list of allowed file extensions.
Specifies a comma-separated (',') list of allowed file extensions. Only files having extentions listed in the AllowExtensions list are added to the file list. Extensions comparison is case-insensitive. If AllowExtensions is an empty string, it's counted like every possible file extention presents in this list, so all files are added to the file list. It you want to use an empty extention, do one of the following: put two commas one by one in the list, or put a single comma at the begining of the list, or put a single comma at the end of the list. Use Filter property to show only allowed files at the "Browse files" dialog.
See also ProhibitExtensions.
ActiveXPowUpload.Filter="Images (.gif;.jpg;.bmp;.png)"; ActiveXPowUpload.AllowExtensions="gif,jpg,bmp,png";
String ProhibitExtensions {set/get}
Specifies a comma-separated list of prohibited file extensions.
Specifies a comma-separated (',') list of prohibited file extensions. Files with such extensions won't be added to the list. Extensions comparison is case-insensitive. An empty string indicates no limitations. It you want to use an empty extention, do one of the following: put two commas one by one in the list, or put a single comma at the begining of the list, or put a single comma at the end of the list. If a file extension is listed both in the AllowExtensions and ProhibitExtensions list, the last wins. I.e. a file with such extension will not added to the file list.
See also AllowExtensions.
ActiveXPowUpload.ProhibitExtensions="exe,com,bat,vbs";
bool EnablePopupMenu {set/get}
Determines whether a popup menu will be available or not.
Determines whether a popup menu will be available or not. Default value is 'true' (Available).
ActiveXPowUpload.EnablePopupMenu=false;
bool EnableFilesList {set/get}
Determines whether files list will be available or not.
Determines whether files list will be available or not. Default value is 'true' (Available). Set to 'false' if you want to hide ActiveX interface but leave area to drop files (drag-n-drop).
See also EnableUploadControlBorder.
ActiveXPowUpload.EnablePopupMenu=false; ActiveXPowUpload.EnableFilesList=false;
bool EnableProgressWindow {set/get}
Enables or disables the upload progress window.
This property works exactly the same as EnableEmbProgressWindow, but controls the upload progress window.
bool ShowUploadProgressWindow {set/get}
Controls visibility of the upload progress window.
This property works exactly the same as ShowUploadEmbProgressWindow, but controls the upload progress window.
bool ShowWhenStartUploadProgressWindow {set/get}
Determines whether the upload progress window will be opened when upload starts or not.
This property works exactly the same as ShowWhenStartUploadEmbProgressWindow, but controls the upload progress window.
bool HideWhenStopUploadProgressWindow {set/get}
Determines whether the upload progress window will be closed when upload terminates or not.
This property works exactly the same as HideWhenStopUploadEmbProgressWindow, but controls the upload progress window.
Default value is false
bool EnableEmbProgressWindow {set/get}
Enables or disables the upload embedded progress window.
When this property is false, the upload embedded progress window is not available (not visible) to the user, but it (the progress window) works as usual under the hud, it stil tracks upload progress state. Set to 'false' if you want to replace progress window with your custom DHTML+JavaScript interface.
Use this property to quickly disable embedded progress window. You can achieve the same visible result turning a number of properties: ShowUploadEmbProgressWindow = false, ShowWhenStartUploadEmbProgressWindow = false, but setting EnableEmbProgressWindow = false is safer and quicker way to do that. For example, we may add a new option that affects embedded progress window behavior. In that case you probably need to change that new option in order to preserve the disired behaviour. On the other hand, setting EnableEmbProgressWindow = false will not require further modifications, it will work as expected regardless new options that may appear in the future.
Default value is true, i.e. upload embedded progress windows is enabled.
ActiveXPowUpload.EnableEmbProgressWindow=false;
bool ShowUploadEmbProgressWindow {set/get}
Controls visibility of the upload embedded progress window.
This property allows you to track and change the status of the upload embedded progress window. Reading this property you know whether embedded progress window is visible or not. Changing this property you can show or hide the window.
Default value is false, i.e. upload embedded progress window is not visible.
Note: Upload embedded progress windows is only visible in the upload mode. If you change this property in the download mode, you will not notice any change in GUI til you switch to the upload mode.
Note: Upload embedded progress window can be disable setting EnableEmbProgressWindow = false. In this case the window is not visible even if ShowUploadEmbProgressWindow = true.
See also ShowWhenStartUploadEmbProgressWindow, HideWhenStopUploadEmbProgressWindow.
<script type="jscript"> ActiveXPowUpload.ShowUploadEmbProgressWindow = true; // show embedded window ActiveXPowUpload.ShowUploadEmbProgressWindow = false; // hide embedded window </script>
bool ShowWhenStartUploadEmbProgressWindow {set/get}
Determines whether the upload embedded progress window will be opened when upload starts or not.
Determines whether the embedded progress window will be opened when upload starts or not. Default value is 'true' (will be opened).
In fact, if this property is true, the ShowUploadEmbProgressWindow is triggered to true when upload starts.
ActiveXPowUpload.ShowWhenStartUploadEmbProgressWindow=false;
bool HideWhenStopUploadEmbProgressWindow {set/get}
Determines whether the upload embedded progress window will be closed when upload terminates or not.
Determines whether the embedded progress window will be closed when upload terminates or not. Default value is 'true' (will be closed).
In fact, if this property is true, the ShowUploadEmbProgressWindow is triggered to false when upload terminates.
bool EnableMessagesDialog {set/get}
Determines whether messages dialogs will be available or not.
Determines whether messages dialogs will be available or not. Default value is 'true' (Available).
ActiveXPowUpload.EnableMessagesDialog=false;
bool EnableErrorsDialog {set/get}
Determines whether errors dialogs will be available or not.
Determines whether errors dialogs will be available or not. Default value is 'true' (Available). Set to 'false' if you want to handle and show errors by custom JavaScript code (OnError event) and HTML interface.
ActiveXPowUpload.EnableErrorsDialog=false;
String InternationalText (textconstant: String) {set/get}
Allows to read and change most internationalization text items used in ActiveX. They include warning and error messages, GUI elements.
An internationalization text item key. All supported keys.
Use this property to change internationalization text items (hereinafter called i18n items) used in ActiveXPowUpload. For example, you may translate text from English into your native language. The control uses unicode to store i18n items, so all unicode characters are allowed.
Some i18n items have parameters that are substituted with some data when the item is used. For example, some items have a substitutable URL parameter.
I18n items with parameters must obey special rules. A string contains placeholders where parameters are inserted. A placeholder is a number in curly braces. For example, "{1}" is a placeholder for the first parameter. The number inside curly braces is the parameter number. The first parameter has number 1, the second - 2, and so on. A parameter placeholder can be placed anywhere in the string. The order of parameters doesn't matter. It's possible to place the second parameter before the first. The same parameter can be placed multiple times in a string. You may omit any parameter as you like. You may not refer to non-existing parameters. For example, you may not use "{3}" if the i18n item has only two parameters.
A percent sign has a special meaning in an i18n item string. It represents a percent-encoded character. Each percent sign must be followed by two characters representing a hexadecimal ASCII code of the character you want to insert. A hexadecimal number consists of 0-9 digits, a-f and A-F letters. Letters are consided case insensitive. To put a percent sign itself place "%25" substring because 0x25 is an ASCII code of the percent sign. This feature is useful when you want to insert, for example, "{1}" substring literally. In the case you simply put it in the string, it is interpreted as a placeholder for the first parameter. It's not what you intend. To output the exact string replace any character with it ASCII code number in order to the substring does not look like a placeholder. For example, you may write "%7B1}", or "{1%7D", or even "%7B%31%7D". Every "%dd" sequence (where d means a digit, or one of the letters a-f, A-F) is replaced by the corresponding character. The 0xdd number must be less than 0x80, because only ASCII characters can be encoded.
I18n items without parameters are treated literally. There is no need to percent-encode anything.
See also International.
ActiveXPowUpload.InternationalText('MENU_ADD_FILE') = "My custom add files...";
String International {set/get}
A string of (key, value) pairs used to internationalize captions, menu items, the progress dialog etc.
This property allows you to get or set all internationalization text items (hereinafter called i18n items) that are possible to change (menu items, captions, messages and so on). The string must be formed according to the following rules.
The string is a sequence of (key, value) pairs separated by a semicolon. The last semicolon is optional. A key and a value are separated by an equal sign ('='). You can't add any space before or after the equal sign unless it is part of the key or the value respectively. See InternationalText property for a list of possible keys. The value may be any string of unicode text, but the '%', '=' and ';' characters must be percent-encoded. I.e. they are replaced with a percent sign followed by an ASCII code of the character: '%' replaced by '%25', '=' replaced by '%3D', ';' replaced by '%3B'. Encoding rules are the same as for items with parameters in InternationalText property. A value may be an empty string. In this case the equal sign is immediately followed by a semicolon (or the end of the string). It's allowed to insert any number of optional new line, space, and tab characters after the semicolon that separates (key, value) pairs. It's done for readability.
For example, the string "abc=123;" sets the key "abc" to the value "123"; the string "abc=100%25" sets the key "abc" to the value "100%"; the string "abc=1+23%3D24%3B10-1%3D9;" sets the key "abc" the value "1+23=24;10-1=9".
It is not necessary to specify all supported keys in the string. You may specify only those you want to change. But when you read the property you get a string containing all the keys the component knows about.
If the string you are tring to set is wrong, an error occures and none of the keys will be changed.
See also InternationalText.
ActiveXPowUpload.International = "LIST_HEADER_FILES=Files;LIST_HEADER_SIZE=Size;MENU_ADD_FILE=Add files...;MENU_ADD_FOLDER=Add folder...;MENU_CANCEL=Cancel;MENU_PASTE=Paste;MENU_REMOVE_ALL=Remove all;MENU_REMOVE_SELECTED=Remove selected;MENU_UPLOAD=Upload;";
String SerialKey {set/get}
Product Serial Key to make Trial version work as full.
Product Serial Key to make Trial version work as full. After purchasing commercial license you need to set serial key at parameters to remove all limitations of trial version (The trial version sometimes shows a dialog box after upload is started.). Every ActiveXPowUpload instance must be activated independently. You need not make extra actions to hide key at a web page. We understand that the key is visible to any person who can view the page source code. But it is our problem:).
ActiveXPowUpload.SerialKey="111111111";
or
<OBJECT ID="AxUpload" CLASSID="CLSID:FB98CEED-9DE1-4517-B30C-CDA19C6D150B"> <param name="SerialKey" value="11111111111"> </OBJECT>
Long FileCount {read only}
Returns number of files in the file list.
Returns number of files in the list. As long as file list may contain folders as well as file the total number of items in the list is usually larger than the value of this property.
See also FileListItemCount property.
var filesCount = ActiveXPowUpload.FileCount;
Long FileListItemCount {read only}
Returns number of items in the file list.
File list may contain folders and files. This property counts both of them.
var itemsCount = ActiveXPowUpload.FileListItemCount;
Long TotalFileSize {read only}
Returns total size of files in the list.
Returns total size of files in the list, in bytes.
var totalSize = ActiveXPowUpload.TotalFileSize;
Long ItemsAtClipboard {read only}
Returns number of items at the clipboard.
Returns number of items at the clipboard if it contains files and folders or zero otherwise. Number of items is not the same a number of files. If the clipboard contains a folder, it is always one item regardless of the number of files in it.
var totalItems = ActiveXPowUpload.ItemsAtClipboard;
Long RedirectURL {set/get}
Specifies a URL where to redirect upload results.
If RedirectURL is not an empty string, ActiveXPowUpload redirects the browser to the URL specified as soon as upload completes. ActiveXPowUpload receives all the text upload script sends in response to data upload. The text is url-encoded (see RFC1738). Control sends a POST request contaning a single ACTIVEXPOWUPLOADREPLY field. ACTIVEXPOWUPLOADREPLY field value is a url-encoded text. Content type of the post request is "application/x-www-form-urlencoded" (see application/x-www-form-urlencoded content type).
To display upload results it is enough to put these lines on an ASP page:
<% @ Language="VBScript" %> <% Response.Write Request.Form("ACTIVEXPOWUPLOADREPLY") %>or the following lines on an ASPX page:
<% @ Page language="c#" %> <% Response.Write(Request.Form["ACTIVEXPOWUPLOADREPLY"]); %>
RedirectURL can be a relative URL. If not blank, the URL may not resolve to a blank URL, for example, "././" is not allowed.
See also RedirectTarget.
This function may be unavailable under special circumstances, see ActiveXPowUpload without browser object notice.
ActiveXPowUpload.RedirectURL = "http://www.somedomain.com/path/to/receiver.asp";
String RedirectTarget {set/get}
Specifies a target window or frame where to show the upload results.
When RedirectURL is set, the component redirect upload results as soon as upload completes. The resulted page must be shown somewhere. That is exactly the RedirectTarget is for. The possible values are:
The default value is _self.
See also RedirectURL.
Long FormItemCount {get}
Number of items in the Form items collection.
See also FormItemCount, FormItem, FormItems, AddFormItem, RemoveFormItem, RemoveAllFormItems.
Variant FormItem (key: Variant) {set/get}
Allows to get/set a text form item by name or by position. In get mode, the property returns the null value if the key specifies an invalid index or item name. In set mode, you must provide either a valid index of the item which value to change or non-empty item name that will be either added or updated in the form items collection.
See also FormItemCount, FormItem, FormItems, AddFormItem, RemoveFormItem, RemoveAllFormItems.
It may be either a string or an interger. If string, the key is an item name. If interger, the key is 0-based index of the text item.
// querying form items var value1 = ActiveXPowUpload.FormItem("name1"); // query by name var value2 = ActiveXPowUpload.FormItem(3); // query by position // check that the key "name1" is valid, in that case we would get a non-null value if(value1 == null) // the "name1" key is invalid else // the "name1" key is valid and value1 is a string // similarly we can check whether the index 3 is valid: if(value2 == null) // the index 3 is invalid else // the index 3 is valid // setting form items ActiveXPowUpload.FormItem("name2") = "value2"; // is the same as writting ActiveXPowUpload.AddFormItem("name2", "value2"); /* If an item with the key "name2" already exists, its value is updated, otherwise a new key-value pair is created. */ // We can also update item's value by position, but in this case we must be sure // that the being updated position exists otherwise we'll get an exception. ActiveXPowUpload.FormItem(5) = "value to item no 5";
String FormItems {set/get}
A list of all text form items. When you set the property, the internal list of properties is reset. New internal list will contain only items listed in the string. (key, value) pairs are separated by a semicolon. Each pair is encoded as a sequence of key, equal sign, and value. The key and the value must be encoded. Each '=', '%', ';' sign must be replaced by the "%3D", "%25", "%3B" string correspondingly. The format of the string is the same as for the International property.
See also FormItemCount, FormItem, FormItems, AddFormItem, RemoveFormItem, RemoveAllFormItems.
ActiveXPowUpload.FormItems = "a=123;b=sw;"; var a = ActiveXPowUpload.FormItems;
Long debug {set/get}
Debug level. Default value is 0. The greater the value the more debug output the control produces. 0 means no debug messages to produce. Each debug message is an OnLog event. This property should be used to troubleshoot the behavior of the ActiveX control. Messages the control produces are not user friendly. They would be helpfull when you want to get support.
See here for collecting debug information.
See also OnLog.
String FileFormItemPattern {set/get}
A template that used to name file form items. "{i0}" and "{i1}" substrings are a placeholder for file number. The first pattern uses zero-based number sequence, in the second pattern file numbers starts from 1. Only the first occurrence of the placeholder is replaced by file number. If the string does not contain the placeholder at all, it's treated like a "{i0}" string is added at the end. For example, "file-{i0}-ext" pattern gets names "file-0-ext", "file-1-ext", "file-2-ext", and so on. The pattern "file{i1}end" gets names "file1end", "file2end", "file3end", and so on.
String Version {get}
Version of the component.
For example, the value may be "1.0.1.0".
String DownloadFolder {get}
A folder where downloaded files will be saved. The value of this property is set with the ShowSelectDownloadFolderDialog method.
Long DownloadFileCount {get}
Number of files in the download file list.
String DefaultUploadFolder {set/get}
Using this property you can set the folder that will be preselected in the "Add upload folder" dialog. That dialog selects the folder you want to add to the upload file list. See the ShowAddFolderDialog method.
String DefaultDownloadFolder {set/get}
Using this property you can set the folder that will be preselected in the "Select download folder" dialog. That dialog selects the base folder where downloaded files will be saved. See the ShowSelectDownloadFolderDialog method.
bool EnableDownloadEmbProgressWindow {set/get}
Enables or disables the download embedded progress window.
This property works exactly the same as EnableEmbProgressWindow, but controls the download embedded progress window.
bool ShowDownloadEmbProgressWindow {set/get}
Controls visibility of the download embedded progress window.
This property works exactly the same as ShowUploadEmbProgressWindow, but controls the download embedded progress window.
bool ShowWhenStartDownloadEmbProgressWindow {set/get}
Determines whether the download embedded progress window will be opened when download starts or not.
This property works exactly the same as ShowWhenStartUploadEmbProgressWindow, but controls the download embedded progress window.
bool HideWhenStopDownloadEmbProgressWindow {set/get}
Determines whether the download embedded progress window will be closed when download terminates or not.
This property works exactly the same as HideWhenStopUploadEmbProgressWindow, but controls the download embedded progress window.
bool EnableDownloadProgressWindow {set/get}
Enables or disables the download progress window.
This property works exactly the same as EnableEmbProgressWindow, but controls the download progress window.
bool ShowDownloadProgressWindow {set/get}
Controls visibility of the download progress window.
This property works exactly the same as ShowUploadEmbProgressWindow, but controls the download progress window.
bool ShowWhenStartDownloadProgressWindow {set/get}
Determines whether the download progress window will be opened when download starts or not.
This property works exactly the same as ShowWhenStartUploadEmbProgressWindow, but controls the download progress window.
bool HideWhenStopDownloadProgressWindow {set/get}
Determines whether the download progress window will be closed when download terminates or not.
This property works exactly the same as HideWhenStopUploadEmbProgressWindow, but controls the download embedded progress window.
Default value is false
long DownloadMode {set/get}
Determines download function behaviour with respect to the already downloaded parts of the files.
ActiveXPowUpload has a number of modes of operation with respect to the already downloaded parts of the files. Each remote file, represented by its URL, is saved to some file on the local machine. If the local file corresponding to the given URL exist before download, we have three alternatives: 1) try to download the remaining part of the file, assuming the local file contains the first piece of the remote file; 2) truncate the local file to 0 length and start download afresh; 3) reject to download this file. You can guide ActiveXPowUpload what to do in that case using the DownloadMode property.
The DownloadMode property can contain the following values:
If the local file does not exist, regardless of the value of DownloadMode, a new file will be created, and download starts as usual.
A few notes about the continue mode should be mentioned. First of all, in any case we cannot be sure that the local file we have is begining of the remote file. We cannot check that not downloading the begining of the remote file that, of cause, we try to avoid. The second point is the remote server (from where we download the file) must be able to provide any piece of the file on demand. This feature of the file server is called "byte serving", "byte range serving", "page on demand", or server supports download resume. It's completely described on RFC 2616 Section 3.12: Range Units. That feature of the web server practically allows you to suspend your download and resume it later without redownloading the part of the file you already have. If the server does not support "byte serving", and DownloadMode is "continue download", and the local file is not empty, download fails.
The default value of the DownloadMode property is 0 — continue download.
ActiveXPowUpload.DownloadMode=0; // use continue mode ActiveXPowUpload.DownloadMode=1; // use overwrite mode
long OperationMode {set/get}
Determines component operation mode: upload, download view.
This property defines graphical interface that ActiveXPowUpload provides: for uploading files, for downloading files . User can switch between interfaces using pop-up menu. This property allows to determine which mode is active now and change the mode in script.
The OperationMode property can contain the following values:
Operation mode cannot be changed at the time either download or upload is running.
The default value of the OperationMode property is 0 — upload mode.
<script language="jscript"> ActiveXPowUpload.OperationMode=0; // show upload interface ActiveXPowUpload.OperationMode=1; // show download interface </script>
<!-- Select the mode that is presented to user when component created. --> <OBJECT id="ActiveXPowUpload" CLASSID="CLSID:FB98CEED-9DE1-4517-B30C-CDA19C6D150B"> <PARAM name="OperationMode" value="1"> </OBJECT>
Boolean AllowDeleteFilesToDownload {set/get}
A flag that allows user to remove files from the download list using Graphical User Interface.
User can delete files from the download list either using pop-up menu or keyboard. Setting AllowDeleteFilesToDownload to false disables both actions.
The default value of the AllowDeleteFilesToDownload property is true.
Boolean QueryFilesSizesBeforeDownload {set/get}
A flag that turn on a mode of quering files sizes before download.
Setting this property to on force the component to query for sizes of files in the download file list. That is done immediately before download. Unless you explicitly specifed a size of the file when adding it, the file size is unknown. Having files with unknown sizes in the file list makes the component difficult to calculate the amount of time left to the end of the download. You can help the component to provide more accurate values quering files sizes beforehand. On the other hand, quering for files sizes requres an extra time.
The default value of the QueryFilesSizesBeforeDownload property is fase.
Boolean RemovePartlyDownloadedFiles {set/get}
A flag that specifies whether partly downloaded files should be deleted.
If file download fails, we have two options: either leave the partly download file as is or delete that file. This property allows to specify what to do with partly downloaded files.
The default value of the RemovePartlyDownloadedFiles property is fase.
Boolean AllowSwitchOperationModeAtMenu {set/get}
A flag that allows user to switch between upload and download using Graphical User Interface.
If AllowSwitchOperationModeAtMenu is true, user can switch between upload and download using Graphical User Interface, a pop-up menu to be precise.
The default value of the AllowSwitchOperationModeAtMenu property is false.
Boolean UseTrustedSitesDatabase {set/get}
Turns on an additional security mechanism - trusted sites database.
false
Trusted Sites Database is a database of sites whom a user stated he trusts to. When the Trusted Sites Database is used, ActiveXPowUpload checks each site the component is going to connect to in the database. If a match is found, ActiveXPowUpload proceeds to do its work, otherwise the user is asked what to do. The user can approve or refuse the site. The approved site is added in the Trusted Sites Database. If the user did not approve the site, ActiveXPowUpload will not connect to that site and the planned operation will be cancelled.
The Trusted Sites Database is stored in the registery.
Long PostDownloadAction {set/get}
An action executed after download.
0
This property specifies an action that will be executed after a successful download. "Successfull" here means that the download has not been cancelled and an unexpected error has not occured. Inablity to download a file is not considered as an unexpected error.
The PostDownloadAction can have the following values:
Note Not every action is possible on every file type. If the requested action is not available for a file, that file is skipped.
Opening downloaded files is potentially dangerous action. You may accidentally activate a malicious program since opening an executable file in fact means running it. User must approve the post download action by clicking the "Yes" button in the question dialog shown after download completes. To see question dialogs message dialogs must not be disabled in the control. See the EnableMessagesDialog property. If message dialogs are disabled, the post download action is not executed.
String ProxyName {set/get}
Specifies the name of the proxy server to use.
"" (blank)
ActiveXPowUpload recognizes only CERN type proxies (HTTP only) and SOCKS proxies. This property must be a server name optionally followed by a port number. For example, "servername" or "servername:8000". Empty string means, use Internet Explorer settings. By default, when this property is not set, ActiveXPowUpload inherits settings from Internet Explorer which can specify proxy server itself.
Note This feauture was added mainly a means of troubleshooting ActiveXPowUpload network activity. It works well with Fiddler HTTP Debugging Proxy.
Note From Fiddler FAQs:
IE7 and the .NET Framework are hardcoded not to send requests for Localhost through any proxies, and as a proxy, Fiddler will not receive such traffic.
The workaround is to use your machine name as the hostname instead of Localhost or 127.0.0.1. So, for instance, rather than hitting http://localhost:8081/mytestpage.aspx, instead visit http://machinename:8081/mytestpage.aspx.
Use may use www.somesite.com instead of localhost. www.somesite.com resolves to 127.0.0.1 IP.
String ContextMenuContent {set/get}
Allows to configure context menu.
"" (blank)
This property allows you to configure context menu of the control. You may specify which items should be disabled or removed from the menu. Other properties may effect context menu items, see AllowSwitchOperationModeAtMenu. State of the control effects context menu items, so, for instance, if the file list is empty, the MENU_REMOVE_ALL item is disable. All factors are combined to determine the state of each menu item. The strictest factor wins. We consider "should be removed" is stricter than "should be disabled" and "should be disabled" is stricter than "should be active". So, for example, if the MENU_DOWNLOAD_REMOVE_ALL item should be disable according the ContextMenuContent property and the control in the upload mode, the MENU_DOWNLOAD_REMOVE_ALL item will be removed since all items of the download mode must be removed in the upload mode. Items not listed in this property are enabled by default.
ContextMenuContent string consists of a space- or tab-separated list of blocks each specifing state of one context menu item. Block is a context menu item identifier, followed by the equal sign and a state code. The state code may be "i" - inactive or disable the item, or "r" - remove the item. Context menu item identifier is the same that's used to internationalize menu. See the InternationalText property.
ActiveXPowUpload.ContextMenuContent = "MENU_DOWNLOAD_FILE_OPEN=r MENU_DOWNLOAD_FILE_EDIT=r" + " MENU_DOWNLOAD_FILE_PRINT=r MENU_ADD_FOLDER=i"; /* That means remove the MENU_DOWNLOAD_FILE_OPEN, MENU_DOWNLOAD_FILE_EDIT, MENU_DOWNLOAD_FILE_PRINT items and disable the MENU_ADD_FOLDER item. */
Boolean EnableUploadControlBorder {set/get}
Determines whether a border is shown around the control.
true
This property allows you to hide a border around the control displayed by default. You may be interested in setting this property if you use the control as a drag and drop target and hid the upload file list. See EnableFilesList property.
This property effects upload mode only.
Boolean EnableUploadBackColor {set/get}
Determines whether a background color is used to fill the control client area.
false
This property allows to enable filling the client area of the control with a custom color.
This property effects upload mode only.
See UploadBackColor, EnableUploadControlBorder.
Color UploadBackColor {set/get}
Determines background color in upload mode.
Containter default background color. I.e. Internet Explorer default background color if the control is loaded on a web page in IE.
This property specifies background color in upload mode. Normally component background is not visible as it is overlapped by upload file list, embedded control bar and other windows. So to see the background color you need to disable them. You may be interested in setting this property if you use the control as a drag and drop target.
Color is in RGB (Red,Green,Blue) format. So 0xff - red, 0xff00 - green, 0xff0000 - blue, 0xffffff - white, 0x000000 - black.
This property effects upload mode only.
See also EnableUploadBackColor, EnableUploadControlBorder.
Specifying background color at control creation.
<OBJECT ID="ActiveXPowUpload" CLASSID="CLSID:FB98CEED-9DE1-4517-B30C-CDA19C6D150B" width="600" height="300"> <PARAM name="EnableUploadBackColor" value="true"> <PARAM name="UploadBackColor" value="65280"> // = 0xff00 green <PARAM name="EnableUploadControlBorder" value="false"> <PARAM name="EnableFilesList" value="false"> <PARAM name="EnableEmbProgressWindow" value="false"> </OBJECT>
Specifying background color at run time.
<script language="jscript"> ActiveXPowUpload.UploadBackColor = 0xff00; // green </script>
Boolean EnableUploadBackImage {set/get}
Enable the upload mode background image.
false
See also UploadBackImageURL.
String UploadBackImageURL {set/get}
Upload mode background image URL.
"" (blank)
You may use a custom image for background in the upload mode. The image is resized to fill the entire client area of the control. Size of the client area is equal to the size of the control when the border is disabled. So width = ActiveXPowUpload.width, height = ActiveXPowUpload.height.
Assigning this property to a valid URL results in downloading and displaying the image. Unconditionally supported image formats: BMP, GIF, JPEG, ICO, WMF, EMF. On condition that GDI+ library is available, supported image formats: BMP, GIF, JPEG, ICO, WMF, EMF, Exif, PNG, TIFF.
This property effects upload mode only.
See also UploadBackColor, EnableUploadBackColor, EnableUploadControlBorder, EnableUploadBackImage, UploadBackImageWidth, UploadBackImageHeight, UploadBackImageError, UploadBackImageDownloadState.
<OBJECT ID="ActiveXPowUpload" CLASSID="CLSID:FB98CEED-9DE1-4517-B30C-CDA19C6D150B" width="600" height="300"> <PARAM name="EnableUploadBackImage" value="true"> <PARAM name="UploadBackImageURL" value="imgs/back.jpg"> </OBJECT>
Long UploadBackImageWidth {get}
Upload mode background image width.
0 (when image is not loaded)
True (not resized) width of the upload mode background image in pixels.
See also UploadBackImageURL.
Long UploadBackImageHeight {get}
Upload mode background image height.
0 (when image is not loaded)
True (not resized) height of the upload mode background image in pixels.
See also UploadBackImageURL.
String UploadBackImageError {get}
Upload mode background image download error message.
"" (blank, when background image is not specified, or it was specified and successfully downloaded)
This property contains error description when the upload mode background URL can not be loaded or downloaded data can not be interpreted.
See also UploadBackImageURL, UploadBackImageDownloadState.
Long UploadBackImageDownloadState {get}
Upload mode background image download state.
0 - initial
This property allows to determine a download state of the background image.
Possible values:
See also UploadBackImageURL, UploadBackImageError.
UploadItems UploadItems {get}
Returns UploadItems collection.
This property returns an UploadItems collection that allows you access FileItem objects of the upload file list.
See also GetItem method, UploadItems collection.
var cnt = ActiveXPowUpload.UploadItems.count; // number of items in the upload file list
Long UploadFocusedItemNumber {set/get}
Index of the upload file list item having the focus.
This property returns an index of the item having the focus or -1 if none is focused. You can also set the focus with this property.
Long DownloadFocusedItemNumber {set/get}
Index of the download file list item having the focus.
This property returns an index of the item having the focus or -1 if none is focused. You can also set the focus with this property.
DownloadItems DownloadItems {get}
Returns DownloadItems collection.
This property returns an DownloadItems collection that allows you access DownloadItem objects of the download file list.
See also GetDownItemItem method, DownloadItems collection.
var cnt = ActiveXPowUpload.DownloadItems.count; // number of items in the download file list
FormItems FormItemsColl {get}
Returns FormItems collection.
This property returns an FormItems collection that allows you access FormItem objects of the form items list.
var cnt = ActiveXPowUpload.FormItemsColl.count; // number of items in the form items list