FileUp includes a server-side progress indicator, that can be displayed to the user using HTML. The server-side progress indicator lets you know how much of the entire upload has arrived at the server. In an upload from the browser to an ASP page, include the progress indicator in a separate ASP page. In this page, you can get and display to the user:
You can use HTML techniques to customize the output effect, and display a counter or a progress bar.
The FileUp Progress Indicator is explained in-depth in the Programmer's Guide. Please see the page "Adding a Server-Side Progress Indicator appropriate to your development language.
SoftArtisans XFile provides a progress indicator that can show accurate client-side progress.
In this example, there are three objects involved:
AXFFile | The explorer-like file selection control that includes all the objects that are
part of
|
---|---|
XFRequest | The non-visual object that actually performs the transfer. |
AXFFileProgress | The control that displays the progress of the transfer. |
The Progress control displays the status of the transfer. We ensure that the Progress control is displayed before the transfer starts. Otherwise, in the multi-threaded environment of Internet Explorer, a transfer could complete before the progress window is displayed, yielding an inconsistent user experience.
Let's discuss how to create a progress window using XFile.
You need two HTML files for these examples: a page that contains AXFFile and a progress page.
The following code is an example of the page containing AXFFile:
The Client Code |
---|
<html>
|
This is very similar to our multiple file download example . The StartUpload function is called from the button created later on in the script. Note that in this example, since we are using the graphical control , there is a different ClassID for the object.
The last script section should also look rather familiar. The major difference in this case is that the AddFile method only requires one argument; the location and naming of the files to be uploaded are handled by FormResp2.asp.
AXFFileProgress.htm starts the upload process. We instantiate the XFile Progress object AXFFileProgress to create and display properties of the transfer.
Here is the major section of AXFFileProgress.htm.
The Progress Indicator |
---|
.....
|
The sections of this file work as follows: