How Does ActiveX/Java Uploader Work

What is ActiveX/Java Uploader?

ActiveX/Java Uploader is the solution intended to make mass file upload easier. It is simply embedded into HTML code of your web page and does not require end-users to download and install it manually. A modern appearance and intuitive user interface make ActiveX/Java Uploader attractive for end-users as well as clear for computer novices. Here is a common workflow to upload files with ActiveX/Java Uploader:

  1. Users visit a page where ActiveX/Java Uploader resides and select as many files as they want.
  2. When all the files are added, they click Upload.
  3. ActiveX/Java Uploader prepares a HTTP POST request with user-selected files and additional data and sends it to the server page specified in its settings. This page receives and processes the request and performs any other upload-related actions.
  4. Progress bar with estimated remaining upload time is shown during the upload process; users always know the upload time, and they can always stop the upload if it takes too long.

Additionally, ActiveX/Java Uploader is able to apply automatic client-side data optimization before sending it. For instance, it can resize images and compress files to ZIP archives. This way the add-on reduces traffic, uploading time, and server disk amount used to store your data.

The figure below demonstrates ActiveX/Java Uploader architecture:

ActiveX/Java Uploader architecture

Let us consider its main parts in detail.

How Does It Work Client-Side?

On the client-side, ActiveX/Java Uploader consists of two parts which implement almost similar functionality:

  • ActiveX control (for Internet Explorer)
  • Java applet (for Mozilla Firefox, Safari, or other browsers having Java runtime support)

Both parts implement a common functionality, namely, user interface for selecting and sorting files, pre-upload file processing, and sending files via HTTP POST request.

ActiveX/Java Uploader JavaScript unifies these parts; it determines a browser type and loads the corresponding component (ActiveX or Java). It provides an API for configuring ActiveX/Java Uploader and manipulating it at runtime, i.e. change properties, call methods, and handle events. ActiveX/Java Uploader JavaScript also helps to debug integration of the control with your web service by displaying notifications if some parameters have inconsistent values. These notifications can be disabled when you are ready to go live with your Web site. Find details in the Using JavaScript API article.

How Does It Work Server-Side?

Since ActiveX/Java Uploader sends files and data in HTTP POST request, the server-side part is represented with a web server which hosts your application. This server performs all the upload-related tasks, such as receiving and saving uploaded files to necessary folders, updating a database, sending email notifications, and etc. In a word, this part implements the internal logic of your application which uses ActiveX/Java Uploader.

When developing this part you may implement your own upload script which will parse the POST request received from ActiveX/Java Uploader. In this case you can use any server platform which is able to receive HTTP POST request. Another way is to use ActiveX/Java Uploader ASP.NET or ActiveX/Java Uploader PHP . They both get the uploaded data, parse it, and provide a typed access to files and text fields on the server side. The built-in autosave feature allows you to create your upload solution without writing a line of code. Refer the Saving Uploaded Files in ActiveX/Java Uploader ASP.NET or Saving Uploaded Files in ActiveX/Java Uploader PHP topic depending on the platform you are going to use ActiveX/Java Uploader with.

One more case is when your application is integrated with a cloud storage, i.e. Amazon S3. Here you do not need to receive files from ActiveX/Java Uploader and redirect them to the storage because ActiveX/Java Uploader supports uploading files directly from a browser to a cloud storage. Find details in the Uploading to Amazon S3 Cloud Storages article.

ActiveX/Java Uploader ASP.NET

ActiveX/Java Uploader ASP.NET is set of ASP.NET server controls which allow to deploy and configure ActiveX/Java Uploader in Microsoft Visual Studio in design mode. Moreover, it significantly simplifies handling uploaded data and saves you the trouble of parsing POST request yourself. The Quick Start with ActiveX/Java Uploader ASP.NET topic gives outlook on how to use it in your web solution.

ActiveX/Java Uploader PHP

ActiveX/Java Uploader PHP implements almost the same functionality and offers the same advantages as ActiveX/Java Uploader ASP.NET. It allows PHP developers to work with ActiveX/Java Uploader in a usual way as with a common PHP object. Find the detailed information about the PHP library in the Quick Start with ActiveX/Java Uploader PHP topic.

See Also

Manual