Site Map Contact Us Home
E-mail Newsletter
Subscribe to get informed about
Clever Components news.

Your Name:
Your Email:
 
SUBSCRIBE
 
Previous Newsletters
 




Products Articles Downloads Order Support
Customer Portal      

Let users receive files via online download manager

Submitted on June 21, 2003

This article describes how to use the Clever Internet DownLoader ActiveX component, available from the Internet, in order integrate it into the web to send physically multiple files to the user local hard disk.

For your convenience we provide the following downloads:

Many web masters provide their users with the ability to download the web resources they publish with more control than offerred by standard web browsers such as Microsoft Internet Explorer, Netscape Navigator, Mozilla, Opera or others. This may be a progress indication, resuming features, more detailed resource information or some animation during the downloading process. In addition they do not want users to get and install a special download managers for this issue.

The best solution is to use ActiveX control and a special web page adapted to download, install and use it. The actual process of downloading is hidden from the user, while in progress.

The following code shows how to make the HTML tag which gets the latest downloader version from the server and sets up its properties to their default values.

<OBJECT id="clDownLoader" classid="CLSID:E8022E6E-5DA0-4A43-AE3C-30F01A0762ED" VIEWASTEXT codebase="https://www.clevercomponents.com/
demo/inetsuite/v34/Cab/cldownldr.cab#Version=-1,-1,-1,-1">
   <PARAM NAME="TryCount" VALUE="2">
   <PARAM NAME="TimeOut" VALUE="5000">
   <PARAM NAME="BatchSize" VALUE="8192">
   <PARAM NAME="LocalFolder" VALUE="c:\Downloads">
   <PARAM NAME="PreviewCharCount" VALUE="256">
   <PARAM NAME="DefaultChar" VALUE="-128">
   <PARAM NAME="CorrectResourceTime" VALUE="-1">
   <span STYLE="color:red">ActiveX control failed to load! -- Please check browser security settings.</span>
</OBJECT>

If you whish to distribute DownLoader ActiveX control via the Internet, you should pack it as a signed Cabinet (CAB) file. The Digital Signature can be purchased from Verisign or from THAWTE.

The CAB file contains a compressed version of the control plus information about how your control is to be installed, for example, which DLLs need to be installed along with the OCX.

You have to publish both the clComDownLoader_js.htm (clComDownLoader_vbs.htm) and the clDownLoader.cab files on your web server in order to make it work properly.

In case of publishing the cldownldr.cab on your web server you have to modify the cldownldr.cab URL path to its correct value within the "codebase" attribute of the "object" tag in the clComDownLoader_js.htm (clComDownLoader_vbs.htm) file.

To provide the information about how the control is to be installed, or whether or not the user's Downloader version is out-of-date and the latest version needs to be downloaded from the server or any other information, the CAB file should contain an information file inside.

A sample of the contents of such an info file is shown below in the following example:

[version]
   signature="$CHICAGO$"
   AdvancedINF=2.0
[Add.Code]
   cldownldr.ocx=cldownldr.ocx
[cldownldr.ocx]
   file-win32-x86=thiscab
   clsid={E8022E6E-5DA0-4A43-AE3C-30F01A0762ED}
   FileVersion=3,4,0,103
   RegisterServer=yes

The source code of the HTML page with Downloader can be found in both the clComDownLoader_js.htm and clComDownLoader_vbs.htm files for Java Script and VB Script versions correspondingly.

Both the js and the vbs demo codes contain a simple HTML page which uses the DownLoader control for downloading World Wide Web resources, getting resource information and displaying the preview of the resource being downloaded.

To learn more about packaging and signing cab files and automatic version updating please refer to "Packaging ActiveX Controls" article available in the MSDN Library and Microsoft online-resource - http://msdn.microsoft.com.

 

With best regards,
Sergey Shirokov
Clever Components team.

    Copyright © 2000-2024