This section contains information about Image Uploader code samples grouped by purpose. It does not contain any platform-related information. For instructions how to deploy code samples on your machine, see the Samples by Platforms topic.
The following code samples are available:
- Basic Demo Sample
-
The simplest quick start demo which illustrates how to use Image Uploader to send images with thumbnails to the server and redirect after the upload.
- User Quota Sample
-
Application which shows how to allow users to upload not more than specific number of files and/or file size. In particular it explains how to display user quota dynamically. In addition, it demonstrates how to make user interface customization.
- Optimized Upload Sample
-
Demo application which reveals how to use Image Uploader to reduce the amount of traffic when uploading images. In this demo Image Uploader sends resized versions of images instead of original files. It automatically preserves EXIF information stored in original files. Moreover, EXIF data is used to rotate an image automatically if it has wrong orientation. Also, here you will learn how to send additional information in attached HTML form along with files.
- Photo Order Sample
-
Demo application that shows how Image Uploader can be used to build a photo order cart. In this application you can see how to configure quality meter, automatic upload recovery, and file restriction rules. Also, this application is a great illustration how to work with items selected for the upload through the JavaScript.
- Localization Sample
-
Multilanguage Image Uploader-based upload application. It demonstrates how to translate Image Uploader user interface into different languages and switch dynamically between them. Also, this demo contains ready-to-use translations to different languages that can be easily reused (even in single-language mode).
- Concurrent Upload Sample
-
Application which demonstrates how to upload multiple files in several threads concurrently. Also, this is one more example how to customize Image Uploader appearance.
- Open File Dialog Sample
-
Emulation of Open File dialog based on Image Uploader and auxiliary ShellComboBox control. This is a good example how to use these two controls together to synchronize Image Uploader folders when the user selects a folder in this combo-box. Additionally, this application demonstrates how to upload not just files, but entire folders. The automatic upload recovery feature is enabled in this demo as well.
- Multiple Descriptions Sample
-
Demo application that reveals how to upload supplementary information along with each file (in addition to the built-in file description field). This demo illustrates how to create a custom upload pane via HTML/JavaScript. It uses auxiliary control named Thumbnail for this purpose. Also, this is one more example how to work with items in the upload list through JavaScript.
- Robust Upload Sample
- Demo application which shows not just how to send files to the server, but also how to verify integrity of uploaded files. To do it, Image Uploader generate hash value that is used to check whether the image was corrupted during upload (see details in the source code). Additionally, this demo illustrates one more look-and-feel customization feature - how to replace standard Image Uploader buttons by custom images without taking them into HTML.
- Watermark Sample
-
Application that demonstrates how to draw a text watermark on each image uploaded to the server. The watermark text in this demo is provided by the user.
- Server Imaging Sample
-
Example of application which performs additional image processing on the server after images are uploaded. It rotates uploaded images if necessary and adds a border to them. Unlike other demo applications, Image Uploader is used merely for the upload. None of imaging operations is made with it.
![]() |
---|
These demo applications are just examples of Image Uploader usage. Image Uploader is a client-side control/applet (i.e. ImageUploader5.cab and ImageUploader5.jar file). All other code (both HTML/JavaScript and server pages) is not a part of Image Uploader ! All actions performed on server (such as saving files to folders, deleting previously uploaded files, and others) are made by this code rather than by Image Uploader. Keep in mind that these demo applications are intended for demonstration purposes only. It is not recommended to use it in production. For real-life applications you should write your own code which takes into account its specifics. However you can use these demos as starter kits that illustrate how to use Image Uploader in some typical situations. Feel free to copy and modify the code from these applications. |