Aurigma Image Uploader 6.5 Dual
Inserting Image Uploader into Web Page
Image Uploader is not a standalone application. It can be interpreted as a "browser add-on" that should be embedded into a page. This topic demonstrates how to do it.
In this topic:
- Installing Image Uploader SDK
- Adding Image Uploader to HTML Code
- Installing on Client Side
- What Next?
To be able to work with Image Uploader, you need to download and install Image Uploader SDK. This SDK contains documentation, demo applications, and redistributable files:
Image Uploader SDK package (ImageUploader.exe file) can be downloaded at this location:
Run this file and follow the wizard steps. On one of these steps you specify the folder where to install all Image Uploader SDK files. Typically this is C:\Program Files\Aurigma\Image Uploader 6.5 Dual. You will find all necessary files there.
Different browsers have different syntax to insert Java applets. None of browsers except of Internet Explorer can work with ActiveX controls. Hence, you may think that it is necessary to write different codes for different browsers to work with Image Uploader.
So, to insert Image Uploader to the page, follow these steps:
- Copy these files to your web server:
- Link iuembed.js with the page by inserting the following line in the beginning of the page:
- Create an instance of ImageUploaderWriter.
- If you do not want to use ActiveX or Java version, set the activeXControlEnabled or javaAppletEnabled correspondingly to false.
- If ActiveX version is enabled, specify URL to the ImageUploader37.cab file via the activeXControlCodeBase property. You can use relative URL.
- If Java version is enabled, specify URL to the folder where ImageUploader37.jar file is located via the javaAppletCodeBase property. You can use relative URL. If the JAR file is located in the same folder with the page, use ./.
- Configure Image Uploader by adding parameters using the addParam method.
- Call the writeHtml method.
That is all. Now if you try to open this page in the browser, you will see that Image Uploader will be loaded.
When the user visits the page that contains Image Uploader, it is automatically downloaded and installed. This process is discussed below.
Depending on Internet Explorer settings, the Information Bar may be displayed.
Figure 1.1. Installation in Internet Explorer 8.
The user should click on the Information Bar and select Install This Add-on or Run Add-on from the dropdown menu.
Figure 1.2. Information bar for ActiveX control installation in Internet Explorer 8.
Then the user should click Install in the add-on installation dialog.
Figure 1.3. Add-on installation dialog in Internet Explorer 8.
By default, Internet Explorer settings allow automatic installation of ActiveX controls (with security dialog). However, sometimes automatic installation is disabled. Typically it happens in corporate networks if the security policy of the company does not allow it.
To give users with such security settings a possibility to use Image Uploader, you can provide them with a standalone installer. It can be downloaded from the following location:
Alternatively, you can register Image Uploader manually by extracting the OCX file from ImageUploader37.cab and running regsvr32 utility for this file:
Once Image Uploader is installed, it will not be downloaded again. If you need to update it (e.g. when deploying new version), follow the steps described in the Upgrading Minor Versions topic.
If Java Runtime Environment (JRE) version 1.5 or later is installed on the client computer and the user explores the page with one of the browsers that are compatible with JRE 1.5, ImageUploader37.jar is automatically downloaded and installed. Depending on the browser settings, security dialog prompting whether the user permits installation of Image Uploader may be displayed see the Figure 2.1 and Figure 2.2). The user should click the Yes button (or OK depending on the client platform) to proceed with installation.
Figure 2.1. Security dialog on Mozilla Firefox.
Figure 2.2. Security dialog on Safari.
If Java applet caching is enabled on the client side and you use caching in the code (as done in all demo applications), once Image Uploader is loaded on this page, it is cached and will not be downloaded again. If you need to update it (e.g. when deploying new version), follow steps described in the Upgrading Minor Versions topic.