This section contains information about Image Uploader code samples grouped by purpose. It does not contain any platform-related information. For instructions on how to deploy code samples on your machine, see the Samples by Platforms topic.
The following code samples are available:
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.
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.
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.
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.
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).
Application which demonstrates how to upload multiple files in several threads concurrently. Also, this is one more example how to customize Image Uploader appearance.
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.
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.
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.
Application that demonstrates how to draw a graphical watermark on each image uploaded to the server. It places the watermark image to the bottom right corner of the image.
Example of the 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.
In this demo application users can upload images to a site and then view places where images were made on Google Maps.
This demo application shows how to use Image Uploader within AJAX web interface. The application utilizes jQuery Tabs widget to switch between Image Uploader and gallery displaying uploaded files without reloading the page.
It is a simple demo that shows how to upload files to Amazon S3 cloud storage.
This demo uploads images along with thumbnails to Amazon S3 cloud storage. Thumbnails are generated by the Image Uploader, so they can be uploaded to Amazon S3 directly from client machine.
This sample demonstrates how to upload files to Nirvanix cloud storage.
These demo applications are just examples of Image Uploader usage. Image Uploader is a client-side control/applet (i.e. ImageUploader37.cab and ImageUploader37.jar file). All other codes (both HTML/JavaScript and server pages) are not a part of Image Uploader! All the 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 specificity.
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.