This documentation is for the old version. Go to the latest Upload Suite docs

Using Stand-Alone Versions of Controls in Image Uploader PHP

This article contains the information on how to use stand-alone and private-label versions of Image Uploader as well as custom embedding scripts with Image Uploader PHP library. It may be useful when you need to upgrade .cab and .jar files obtained from Aurigma without updating the PHP library itself. If, however, you deploy Image Uploader using embedding scripts you should deploy a private-label version in the way described in the How to Use Private-label Versions topic.

Walk through the following steps to configure ImageUploader object of the PHP library to work with private-label or stand-alone version.

  1. Obtain *.cab and *.jar files as well as private-label embedding instructions from Aurigma. For example, you have got MyUploader.cab and MyUploader.jar files.
  2. Add a new folder to your web application or use an existing one.
  3. Put your MyUploader.cab and MyUploader.jar files to this folder.
  4. Specify the name of this folder as a value of the setScriptsDirectory($value) property. You can use relative URL.
  5. Specify MyUploader.cab and MyUploader.jar filenames using the setActiveXControlCabFileName($value) and setJavaAppletJarFileName($value) properties respectively.
  6. Use the setActiveXControlVersion($value) and setJavaAppletVersion($value) properties to specify version numbers of the ActiveX control and Java applet.
  7. Specify the CLSID and PROGID of the ActiveX control as values of the setActiveXControlClassId($value) and setActiveXControlProgId($value) properties respectively.
  8. Specify the Java applet class name with the setJavaAppletClassName($value) property.

All the details you need to specify using these properties should be obtained from Aurigma. If some parameters were not sent you should use default values.

Here is the code sample which implements this.

PHP
<?php
    $imageUploader = new ImageUploader("ImageUploader1", 650, 400);

    $imageUploader->setScriptsDirectory("MyUploader");
    $imageUploader->setActiveXControlCabFileName("MyUploader.cab");
    $imageUploader->setJavaAppletJarFileName("MyUploader.jar");
    $imageUploader->setActiveXControlVersion("6,0,2,0");
    $imageUploader->setJavaAppletVersion("6.0.2.0");
    $imageUploader->setActiveXControlClassId("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");
    $imageUploader->setActiveXControlProgId("MyCompany.MyUploader");
    $imageUploader->setJavaAppletClassName("com.mycompany.myuploader.MyUploader.class");

    $imageUploader->render();
?>

The steps above should be performed for each Image Uploader-related class (ShellComboBox, Thumbnail, or UploadPane) used in your code. In that case each class should be initiated with its own CLSID, PROGID, and class name values obtained from Aurigma.

If you want to use custom Image Uploader embedding scripts you should put them to the folder specified with the setScriptsDirectory($value) property.

Note

When you customize Image Uploader embedding scripts you should not rename them, otherwise they will be inaccessible through Image Uploader PHP library.

See Also

Reference

Manual