Common Client-Side Solutions

Many times you may find that what you wish to accomplish with your uploads or downloads can not be done with a purely server-side solution. The nature of the Internet requires a component to operate on the client's machine to achieve some functionality.

Users often have trouble solving problems because the browsers don't support viable solutions. Do any of the situations listed in the following table sound familar?

Situation Corresponding Example
Want to limit the files you upload to a specific type? You can restrict the types of files after they are uploaded, as demonstrated in a previous example. But do you really want to first upload hundreds of files before you weed out the ones you don't need? Wouldn't it be more useful to restrict the file types before you upload? Restricting Files Before Uploading
You have files in a directory tree that you need to upload. And you'd like to upload each subdirectory and its contents. How do you go about accomplishing this? Directory Upload
Not quite sure which browser your users are using? Trying to build one application to handle all cases? Browser Neutral Upload
You have a lot of files and you need to download them, and you want to download them all at the same time. Is it possible? Simultaneous Downloading of Multiple Files
When you're uploading a lot of files, have you ever wanted to know how the upload was doing? Wouldn't a progress indicator be helpful? Adding a Progress Indicator
Maybe you don't want the user to be able to set which files he or she will be uploading. For obvious reasons, this is not allowed with a purely server-based applications, as the security implications would be rather daunting. However, you can preset files with a client-side component. Presetting Files for Download
Are there times when you do not want any user interventions to uploading files. When you upload the same files everyday, maybe you don't need to see or select the filenames. Automated Uploads Information

It is because of these needs that we offer two client-side components, SA-XFile and SA-JFile.

SA-XFile and SA-JFile are sold separately, and are available as part of Software Artisans' ASP Studio. See Related Products for more information.

SA-XFile
SA-XFile is an ActiveX component that works within Internet Explorer, Visual Basic Programs, and even through a Windows shell extension. SA-XFile is an excellent client-side solution for those who know that all their clients will be using Internet Explorer. Developers have a number of solutions when using SA-XFile, including creating instances of the object through code, or using the ActiveX control. It can also be used from Active Server Pages, Internet Explorer, Visual Basic, and C++.

SA-XFile is available on Win32 platforms, including Windows95, Windows98, Windows2000, and Windows NT.

As with any ActiveX component, you need to have the proper CAB files in your application's directory so that any clients who do not currently have the component installed can download and install on demand. In the case of SA-XFile, that file is SAXFile.cab, which should be located in your installation directory.

SA-JFile
SA-JFile is a Java component and an excellent client-side solution that allows for much greater flexibility when working with users who may be using a wide variety of browsers on a number of different platforms.

As with any Java component, you need to have the proper CAB and JAR files in your application's directory so that any clients who do not currently have the component installed can download and install the proper files on demand. In the case of SA-JFile, those files are SAJFile.cab and SAJFile.jar, which should be located in your installation directory.

For the following groups of examples to work properly, you need to have a client-side component installed on your system. If you are interested in an evaluation version of either SA-JFile or SA-XFile, navigate to http://www.softartisans.com/sajfile.html or http://www.softartisans.com/saxfile.html.

The following examples demonstrate client-side solutions, using both SA-XFile and SA-JFile:

Restricting Files Before Uploading

Directory Upload

Browser Neutral Upload

Simultaneous Downloading of Multiple Files

Adding a Progress Indicator

Presetting Files for Download

Hidden Information

These examples do not contain complete ASP code. If you want to see complete applications, including error handling, check out the samples provided as part of the SA-FileUp distribution. See Programmer's Samples for a list of the contents of the Samples directory.

 

 

Previous Page Next Page