---
title: "Configuring Files to be Uploaded in ActiveX/Java Uploader"
canonical: https://www.aurigma.com/docs/us8/configuring-files-to-be-uploaded-iu.htm
product: "Upload Suite 8"
---

# Configuring Files to be Uploaded in ActiveX/Java Uploader
 
After specifying [common upload settings](https://www.aurigma.com/docs/us8/configuring-common-upload-settings-iu.htm.md), it is required to set at least one Converter[Converter (ASP.NET)](https://www.aurigma.com/docs/us8/JA_T_Aurigma_ImageUploader_Converter.htm.md)[Converter (PHP)](https://www.aurigma.com/docs/us8/JA_T_P_Converter.htm.md)[converter (JavaScript)](https://www.aurigma.com/docs/us8/JA_T_J_$au_converter.htm.md). Each **Converter** configures one *converted file* (original file, thumbnail created from original image file, icon associated with original file, or original file compressed into ZIP archive) which will be uploaded for each of user-selected files.

For example, you configure ActiveX/Java Uploader to send an original file and a downsized copy of image (if the original file is an image) or an icon associated with the original file. It means that if a user selects two files (a JPEG image and a PDF document) ActiveX/Java Uploader will send four files:

- the JPEG image and the PDF file themselves
- a resized copy of the image and a PDF icon

The following samples demonstrate this configuration.
```aspx-cs
<aur:Uploader ID="Uploader1" runat="server">
    <Converters>
        <aur:Converter Mode="*.*=SourceFile" />
        <aur:Converter Mode="*.*=Thumbnail;*.*=Icon" 
            ThumbnailHeight="120" 
            ThumbnailWidth="120" 
            ThumbnailFitMode="Fit" />
    </Converters>
</aur:Uploader>
``````
$uploader = new Uploader("Uploader1");
        
$converters = &$uploader->getConverters();
$converter = new Converter();
$converter->setMode("*.*=SourceFile");
$converters[] = $converter;
$converter = new Converter();
$converter->setMode("*.*=Thumbnail;*.*=Icon");
$converter->setThumbnailWidth(120);
$converter->setThumbnailHeight(120);
$converter->setThumbnailFitMode("Fit");
$converters[] = $converter;
``````
var u = $au.uploader({
    id: 'Uploader1',
    converters: [
        {mode: '*.*=SourceFile'},
        {mode: '*.*=Thumbnail;*.*=Icon', thumbnailFitMode: 'Fit', thumbnailWidth: '120', thumbnailHeight: '120'}
    ]
});
```
The way you retrieve and save converted files on the server side depends on the platform you use. Find the detailed instructions in the [Saving Uploaded Files in ActiveX/Java Uploader ASP.NET](https://www.aurigma.com/docs/us8/saving-uploaded-files-in-aspnet-iu.htm.md) and [Saving Uploaded Files in ActiveX/Java Uploader PHP](https://www.aurigma.com/docs/us8/saving-uploaded-files-in-php-iu.htm.md) topics.

Consider the **Converter** properties in detail below.

## Configuring Conversion Mode
 
The Mode[Mode (ASP.NET)](https://www.aurigma.com/docs/us8/JA_P_Aurigma_ImageUploader_Converter_Mode.htm.md)[Mode (PHP)](https://www.aurigma.com/docs/us8/JA_P_P_Converter_Mode.htm.md)[mode (JavaScript)](https://www.aurigma.com/docs/us8/JA_P_J_$au_converter_mode.htm.md) is the most prominent property of the **Converter** class. It specifies what will be uploaded for each file selected for upload (i.e. the original file, a downsized copy of the image, an icon, or a ZIP archive). One **Converter** instance can specify different types of converted files for various types of files selected for upload client-side. For example, you can configure the **Converter** to send downsized copies of images for JPEG images and original files for files of other types. It can be done using the aforementioned **Mode** property.
 
The **Mode** property accepts a format string consisting of `masks=mode` pairs separated by a semicolon. Each pair includes a set of file masks separated by commas and a corresponding mode. In general, this string has the following syntax:
 
`mask11,mask12,...=mode1;mask21,mask22,...=mode2;...`
 
Here is the list of supported modes:
 
- **SourceFile** means that the selected file will be uploaded from a user's computer without any changes.
- **Thumbnail** works as follows: if the selected file is an image, it will be resized using the parameters listed below and uploaded as a JPEG file. Otherwise, a converted file will not be sent.
- **Icon** means that the system icon associated with the selected file will be uploaded.
- **Zip** means that the selected file will be packed into a ZIP archive and then uploaded.
- **None** means that no file will be uploaded.

When ActiveX/Java Uploader prepares the upload request, it extracts `masks=mode` pairs. It checks whether the name of the current file fits the file mask specified in the pair. If it fits the current pair, ActiveX/Java Uploader sends an item specified in the pair to a server. Otherwise, if no appropriate file mask is found or ActiveX/Java Uploader is unable to create a downsized copy of the image (if mode is specified as **Thumbnail** and the current file is not an image), ActiveX/Java Uploader checks the next pair in the same way.
 
**Note** 
If there is no file mask corresponding to the original file extension or no appropriate mode, then ActiveX/Java Uploader does not send this converted file.

## Uploading Thumbnails
 
If you specify the **Mode** property to send a thumbnail, you can also set the following thumbnail parameters:
 
- ThumbnailHeight[ThumbnailHeight (ASP.NET)](https://www.aurigma.com/docs/us8/JA_P_Aurigma_ImageUploader_Converter_ThumbnailHeight.htm.md)[ThumbnailHeight (PHP)](https://www.aurigma.com/docs/us8/JA_P_P_Converter_ThumbnailHeight.htm.md)[thumbnailHeight (JavaScript)](https://www.aurigma.com/docs/us8/JA_P_J_$au_converter_thumbnailHeight.htm.md) and ThumbnailWidth[ThumbnailWidth (ASP.NET)](https://www.aurigma.com/docs/us8/JA_P_Aurigma_ImageUploader_Converter_ThumbnailWidth.htm.md)[ThumbnailWidth (PHP)](https://www.aurigma.com/docs/us8/JA_P_P_Converter_ThumbnailWidth.htm.md)[thumbnailWidth (JavaScript)](https://www.aurigma.com/docs/us8/JA_P_J_$au_converter_thumbnailWidth.htm.md) specify the height and width of the thumbnail respectively.
- ThumbnailFitMode[ThumbnailFitMode (ASP.NET)](https://www.aurigma.com/docs/us8/JA_P_Aurigma_ImageUploader_Converter_ThumbnailFitMode.htm.md)[ThumbnailFitMode (PHP)](https://www.aurigma.com/docs/us8/JA_P_P_Converter_ThumbnailFitMode.htm.md)[thumbnailFitMode (JavaScript)](https://www.aurigma.com/docs/us8/JA_P_J_$au_converter_thumbnailFitMode.htm.md) specifies how the thumbnail is to be resized. The following values are supported:

    - **Fit** means that the original image should be resized to fit the rectangle specified with the **ThumbnailHeight** and **ThumbnailWidth** properties. Note that the proportions of the original image will be kept.
    - **Width** means that the original image should be resized to be not wider than the **ThumbnailWidth** value.
    - **Height** means that the original image should be resized to be not higher than the **ThumbnailHeight** value.
    - **ActualSize** means that dimensions of the original image should be kept; however, it can be rotated or recompressed if necessary.
- ThumbnailApplyCrop[ThumbnailApplyCrop (ASP.NET)](https://www.aurigma.com/docs/us8/JA_P_Aurigma_ImageUploader_Converter_ThumbnailApplyCrop.htm.md)[ThumbnailApplyCrop (PHP)](https://www.aurigma.com/docs/us8/JA_P_P_Converter_ThumbnailApplyCrop.htm.md)[thumbnailApplyCrop (JavaScript)](https://www.aurigma.com/docs/us8/JA_P_J_$au_converter_thumbnailApplyCrop.htm.md) specifies whether the thumbnail should be cropped.
- ThumbnailBgColor[ThumbnailBgColor (ASP.NET)](https://www.aurigma.com/docs/us8/JA_P_Aurigma_ImageUploader_Converter_ThumbnailBgColor.htm.md)[ThumbnailBgColor (PHP)](https://www.aurigma.com/docs/us8/JA_P_P_Converter_ThumbnailBgColor.htm.md)[thumbnailBgColor (JavaScript)](https://www.aurigma.com/docs/us8/JA_P_J_$au_converter_thumbnailBgColor.htm.md) specifies the background color of the thumbnail. This color is used when the thumbnail is created for an image with transparency.
- ThumbnailCompressOversizedOnly[ThumbnailCompressOversizedOnly (ASP.NET)](https://www.aurigma.com/docs/us8/JA_P_Aurigma_ImageUploader_Converter_ThumbnailCompressOversizedOnly.htm.md)[ThumbnailCompressOversizedOnly (PHP)](https://www.aurigma.com/docs/us8/JA_P_P_Converter_ThumbnailCompressOversizedOnly.htm.md)[thumbnailCompressOversizedOnly (JavaScript)](https://www.aurigma.com/docs/us8/JA_P_J_$au_converter_thumbnailCompressOversizedOnly.htm.md) specifies whether an original image should be uploaded as the thumbnail in case when original image dimensions and file size are not bigger than dimensions and file size of this thumbnail.
- ThumbnailCopyExif[ThumbnailCopyExif (ASP.NET)](https://www.aurigma.com/docs/us8/JA_P_Aurigma_ImageUploader_Converter_ThumbnailCopyExif.htm.md)[ThumbnailCopyExif (PHP)](https://www.aurigma.com/docs/us8/JA_P_P_Converter_ThumbnailCopyExif.htm.md)[thumbnailCopyExif (JavaScript)](https://www.aurigma.com/docs/us8/JA_P_J_$au_converter_thumbnailCopyExif.htm.md) specifies whether the thumbnail should contain EXIF metadata copied from the original file.
- ThumbnailCopyIptc[ThumbnailCopyIptc (ASP.NET)](https://www.aurigma.com/docs/us8/JA_P_Aurigma_ImageUploader_Converter_ThumbnailCopyIptc.htm.md)[ThumbnailCopyIptc (PHP)](https://www.aurigma.com/docs/us8/JA_P_P_Converter_ThumbnailCopyIptc.htm.md)[thumbnailCopyIptc (JavaScript)](https://www.aurigma.com/docs/us8/JA_P_J_$au_converter_thumbnailCopyIptc.htm.md) specifies whether the thumbnail should contain IPTC metadata copied from the original file.
- ThumbnailJpegQuality[ThumbnailJpegQuality (ASP.NET)](https://www.aurigma.com/docs/us8/JA_P_Aurigma_ImageUploader_Converter_ThumbnailJpegQuality.htm.md)[ThumbnailJpegQuality (PHP)](https://www.aurigma.com/docs/us8/JA_P_P_Converter_ThumbnailJpegQuality.htm.md)[thumbnailJpegQuality (JavaScript)](https://www.aurigma.com/docs/us8/JA_P_J_$au_converter_thumbnailJpegQuality.htm.md) specifies a JPEG quality value for the thumbnail. This is a number in the ` [0, 100]` range. If you specify `0`, the file size will be extremely small, and the quality will be very low (almost always unacceptable). Alternatively, if you specify `100`, the file size will be quite large, but JPEG artifacts will be almost invisible.
- ThumbnailKeepColorSpace[ThumbnailKeepColorSpace (ASP.NET)](https://www.aurigma.com/docs/us8/JA_P_Aurigma_ImageUploader_Converter_ThumbnailKeepColorSpace.htm.md)[ThumbnailKeepColorSpace (PHP)](https://www.aurigma.com/docs/us8/JA_P_P_Converter_ThumbnailKeepColorSpace.htm.md)[thumbnailKeepColorSpace (JavaScript)](https://www.aurigma.com/docs/us8/JA_P_J_$au_converter_thumbnailKeepColorSpace.htm.md) specifies whether to preserve original color space when creating a thumbnail.
- ThumbnailResizeQuality[ThumbnailResizeQuality (ASP.NET)](https://www.aurigma.com/docs/us8/JA_P_Aurigma_ImageUploader_Converter_ThumbnailResizeQuality.htm.md)[ThumbnailResizeQuality (PHP)](https://www.aurigma.com/docs/us8/JA_P_P_Converter_ThumbnailResizeQuality.htm.md)[thumbnailResizeQuality (JavaScript)](https://www.aurigma.com/docs/us8/JA_P_J_$au_converter_thumbnailResizeQuality.htm.md) specifies a resize quality value of the thumbnail.
- ThumbnailResolution[ThumbnailResolution (ASP.NET)](https://www.aurigma.com/docs/us8/JA_P_Aurigma_ImageUploader_Converter_ThumbnailResolution.htm.md)[ThumbnailResolution (PHP)](https://www.aurigma.com/docs/us8/JA_P_P_Converter_ThumbnailResolution.htm.md)[thumbnailResolution (JavaScript)](https://www.aurigma.com/docs/us8/JA_P_J_$au_converter_thumbnailResolution.htm.md) specifies an image resolution of the thumbnail. If `0` value is specified, the original image resolution is used.
- ThumbnailWatermark[ThumbnailWatermark (ASP.NET)](https://www.aurigma.com/docs/us8/JA_P_Aurigma_ImageUploader_Converter_ThumbnailWatermark.htm.md)[ThumbnailWatermark (PHP)](https://www.aurigma.com/docs/us8/JA_P_P_Converter_ThumbnailWatermark.htm.md)[thumbnailWatermark (JavaScript)](https://www.aurigma.com/docs/us8/JA_P_J_$au_converter_thumbnailWatermark.htm.md) specifies a watermark of the thumbnail.

## See Also
 
### Refernce
 
- Converter Class[Converter (ASP.NET)](https://www.aurigma.com/docs/us8/JA_T_Aurigma_ImageUploader_Converter.htm.md)[Converter (PHP)](https://www.aurigma.com/docs/us8/JA_T_P_Converter.htm.md)[converter (JavaScript)](https://www.aurigma.com/docs/us8/JA_T_J_$au_converter.htm.md)

### Manual
 
- [Configuring Common Upload Settings in ActiveX/Java Uploader](https://www.aurigma.com/docs/us8/configuring-common-upload-settings-iu.htm.md)
- [Saving Uploaded Files in ActiveX/Java Uploader ASP.NET](https://www.aurigma.com/docs/us8/saving-uploaded-files-in-aspnet-iu.htm.md)
- [Saving Uploaded Files in ActiveX/Java Uploader PHP](https://www.aurigma.com/docs/us8/saving-uploaded-files-in-php-iu.htm.md)
- [Uploading Images](https://www.aurigma.com/docs/us8/uploading-images-iu.htm.md)
