From time to time new versions of Image Uploader with new features and bug fixes are released. This topic discusses how to update Image Uploader properly.
The way to upgrade Image Uploader depends on the way in which it is embedded:
If you just replace ImageUploader37.cab and ImageUploader37.jar files you will find out that old version is still used. It happens because the browser caches ActiveX controls and Java applets. It allows avoiding re-downloading them every time the user reloads the page. Therefore, it reduces traffic and increases response time. However, it requires some additional efforts to update Image Uploader.
In a common way, you should update Image Uploader-related files, set new version numbers as values of the corresponded properties, and update Image Uploader on the client side.
It works in the following way:
Let us see how to update ActiveX and Java version using iuembed.js.
To update ActiveX version of Image Uploader:
To get a version number of ActiveX control, you can:
Also, the version number is specified on the Image Uploader SDK download page.
Numbers inside the version string should be separated with comma. For example, 6,0,10,0
.
Here is an example of the activeXControlVersion usage:
<script language="javascript"> var iu = new ImageUploaderWriter("ImageUploader1", 610, 500); iu.activeXControlEnabled = true; iu.activeXControlCodeBase = "ImageUploader6.cab"; iu.activeXControlVersion = "6,0,10,0"; iu.writeHtml(); </script>
To update Java version of Image Uploader
Additionally, there is a javaAppletCached property which specifies whether Java applet caching feature is enabled.
If it is false
, the applet is always re-downloaded from the server regardless to the version number.
The applet caching may be disabled by the user. So if you set the javaAppletCached to true
,
and the caching still does not work, make sure the Enable Caching checkbox is not cleared in the Java control panel
(see screenshots in the Updating Image Uploader on the Client Side topic).
This code snippet demonstrates how to use these properties properly:
<script language="javascript"> var iu = new ImageUploaderWriter("ImageUploader", 610, 500); iu.javaAppletEnabled=true; iu.javaAppletVersion="6.0.10.0"; iu.writeHtml(); </script>
If Image Uploader is embedded using the ASP.NET control, all what you need to update Image Uploader is copying new Aurigma.ImageUploader.dll to the server instead of the old one.
By analogy with Image Uploader ASP.NET control, to update Image Uploader embedded PHP library just replace the ImageUploaderPHP with a new one.